From bf30dc30383520015bd265e528325c64e5ebe4ce Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Fri, 14 Feb 2014 13:58:14 +0200 Subject: 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). --- lib/scope.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/scope.js') 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) }); -- cgit v1.2.3