public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42c25d9
)
prevent mangling only when eval is *called*, not when it's just referenced
author
Mihai Bazon
<mihai@bazon.net>
Fri, 5 Oct 2012 13:17:31 +0000
(16:17 +0300)
committer
Mihai Bazon
<mihai@bazon.net>
Fri, 5 Oct 2012 13:17:31 +0000
(16:17 +0300)
lib/scope.js
patch
|
blob
|
history
diff --git
a/lib/scope.js
b/lib/scope.js
index
5f4a64a
..
d926d4d
100644
(file)
--- a/
lib/scope.js
+++ b/
lib/scope.js
@@
-203,7
+203,7
@@
AST_Toplevel.DEFMETHOD("figure_out_scope", function(){
globals[name] = g;
}
node.thedef = g;
- if (name == "eval") {
+ if (name == "eval"
&& tw.parent() instanceof AST_Call
) {
for (var s = node.scope; s && !s.uses_eval; s = s.parent_scope)
s.uses_eval = true;
}