public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08b8030
)
Limit max iterations for tighten_body
author
Mihai Bazon
<mihai.bazon@gmail.com>
Mon, 16 Nov 2015 10:06:12 +0000
(12:06 +0200)
committer
Mihai Bazon
<mihai.bazon@gmail.com>
Mon, 16 Nov 2015 10:08:24 +0000
(12:08 +0200)
Ref #866
lib/compress.js
patch
|
blob
|
history
diff --git
a/lib/compress.js
b/lib/compress.js
index
3efca41
..
c384e99
100644
(file)
--- a/
lib/compress.js
+++ b/
lib/compress.js
@@
-199,7
+199,7
@@
merge(Compressor.prototype, {
};
function tighten_body(statements, compressor) {
- var CHANGED;
+ var CHANGED
, max_iter = 10
;
do {
CHANGED = false;
if (compressor.option("angular")) {
@@
-218,7
+218,7
@@
merge(Compressor.prototype, {
if (compressor.option("join_vars")) {
statements = join_consecutive_vars(statements, compressor);
}
- } while (CHANGED);
+ } while (CHANGED
&& max_iter-- > 0
);
if (compressor.option("negate_iife")) {
negate_iifes(statements, compressor);