aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-10 10:03:06 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-03-10 10:03:06 -0700
commit1c25bb627bb43d2595dc59545d65d5a2ec83a9bf (patch)
treeaccae9f136efad354bbe7ee6be12ce47f22f8f39
parente5afcd2290c4914ec0ba16d8b54168c535773a0c (diff)
use whitelist of lines to forward out of generated functions area
-rw-r--r--tools/js_optimizer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py
index 60093bca..ae7fe817 100644
--- a/tools/js_optimizer.py
+++ b/tools/js_optimizer.py
@@ -153,7 +153,7 @@ def run_on_js(filename, passes, js_engine, jcache):
class Finals:
buf = []
def process(line):
- if len(line) > 0 and not line.startswith((' ', 'function', '}')):
+ if len(line) > 0 and (line.startswith('Module[') or line.endswith('["X"]=1;')):
Finals.buf.append(line)
return False
return True