[Pkg-javascript-commits] [uglifyjs] 02/05: Make reserved names take priority over the name cache

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


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

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

commit e48db3a8b6ce8bf06448224dbb3f6339f834ed98
Author: Mihai Bazon <mihai.bazon at gmail.com>
Date:   Thu May 7 15:01:16 2015 +0300

    Make reserved names take priority over the name cache
---
 lib/propmangle.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/propmangle.js b/lib/propmangle.js
index 8f291d6..d3e582d 100644
--- a/lib/propmangle.js
+++ b/lib/propmangle.js
@@ -140,10 +140,10 @@ function mangle_properties(ast, options) {
     // only function declarations after this line
 
     function can_mangle(name) {
+        if (reserved.indexOf(name) >= 0) return false;
         if (options.only_cache) {
             return cache.props.has(name);
         }
-        if (reserved.indexOf(name) >= 0) return false;
         if (/^[0-9.]+$/.test(name)) return false;
         return true;
     }

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