Mangle name of exception when --screw-ie8. Fix #430.
authorMihai Bazon <mihai@bazon.net>
Fri, 14 Feb 2014 11:58:14 +0000 (13:58 +0200)
committerMihai Bazon <mihai@bazon.net>
Fri, 14 Feb 2014 11:58:14 +0000 (13:58 +0200)
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

index cce0f3c..1ce17fa 100644 (file)
@@ -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) });