Skip to content
Browse files

Merge in a oustanding pull from mainline uglyfi that replaces new on …

…all error constructors
  • Loading branch information...
1 parent 25516d0 commit 0b3bd60980c32b0a2658683c4c016f9aca81d0f9 Ivo Wetzel committed Sep 3, 2012
Showing with 10 additions and 1 deletion.
  1. +10 −1 lib/squeeze-more.js
View
11 lib/squeeze-more.js
@@ -39,7 +39,16 @@ function ast_squeeze_more(ast) {
} else {
return walk([ "call", [ "name", "Object" ], args ]);
}
- } else if ((ctor[1] == "RegExp" || ctor[1] == "Function" || ctor[1] == "Error") && !scope.has(ctor[1])) {
+ } else if ((ctor[1] == "RegExp"
+ || ctor[1] == "Function"
+ || ctor[1] == "Error"
+ || ctor[1] == "EvalError"
+ || ctor[1] == "RangeError"
+ || ctor[1] == "ReferenceError"
+ || ctor[1] == "SyntaxError"
+ || ctor[1] == "TypeError"
+ || ctor[1] == "URIError"
+ ) && !scope.has(ctor[1])) {
return walk([ "call", [ "name", ctor[1] ], args]);
}
}

0 comments on commit 0b3bd60

Please sign in to comment.
Something went wrong with that request. Please try again.