diff options
author | Mihai Bazon <mihai@bazon.net> | 2014-02-14 13:58:14 +0200 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2014-02-14 13:58:14 +0200 |
commit | bf30dc30383520015bd265e528325c64e5ebe4ce (patch) | |
tree | 09f8d70402ba417ab5901f625d39a70ad45abc13 | |
parent | ef2ef07cbd945c7a6456adedc413858145a9ed10 (diff) | |
download | tracifyjs-bf30dc30383520015bd265e528325c64e5ebe4ce.tar.gz tracifyjs-bf30dc30383520015bd265e528325c64e5ebe4ce.zip |
Mangle name of exception when --screw-ie8. Fix #430.
The effect of not mangling it was visible only with --screw-ie8 (otherwise
the names would be mangled exactly because they leaked into the parent
scope).
-rw-r--r-- | lib/scope.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/scope.js b/lib/scope.js index cce0f3c5..1ce17fa6 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -365,6 +365,10 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options){ node.mangled_name = name; return true; } + if (options.screw_ie8 && node instanceof AST_SymbolCatch) { + to_mangle.push(node.definition()); + return; + } }); this.walk(tw); to_mangle.forEach(function(def){ def.mangle(options) }); |