[Pkg-javascript-commits] [uglifyjs] 68/190: Limit max iterations for tighten_body
Antonio Terceiro
terceiro at moszumanska.debian.org
Sun Aug 7 23:17:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to annotated tag upstream/2.7.0
in repository uglifyjs.
commit b6968b6bd2a740281e03e804ae68b3f5e63ce5ed
Author: Mihai Bazon <mihai.bazon at gmail.com>
Date: Mon Nov 16 12:06:12 2015 +0200
Limit max iterations for tighten_body
Ref #866
---
lib/compress.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/compress.js b/lib/compress.js
index 3efca41..c384e99 100644
--- 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git
More information about the Pkg-javascript-commits
mailing list