[Pkg-javascript-commits] [uglifyjs] 70/77: Avoid sequencesize for more than 2000 statements.

Jonas Smedegaard dr at jones.dk
Tue May 19 00:02:34 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag v2.4.18
in repository uglifyjs.

commit f0ab1b02e63bfad1162f77bb8545de34814f44f5
Author: Mihai Bazon <mihai.bazon at gmail.com>
Date:   Sun Mar 22 12:51:15 2015 +0200

    Avoid sequencesize for more than 2000 statements.
    
    It hardly saves any bytes for a sequence so long, and it risks blowing the
    stack with the recursive Seq functions.
    
    Ref #414
---
 lib/compress.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/compress.js b/lib/compress.js
index 17bebf7..b50e7cf 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -479,7 +479,7 @@ merge(Compressor.prototype, {
         };
 
         function sequencesize(statements, compressor) {
-            if (statements.length < 2) return statements;
+            if (statements.length < 2 || statements.length > 2000) return statements;
             var seq = [], ret = [];
             function push_seq() {
                 seq = AST_Seq.from_array(seq);

-- 
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