Build fix. Strip out "use strict" everywhere so that the perf dashboard works on...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jun 2016 22:25:52 +0000 (22:25 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jun 2016 22:25:52 +0000 (22:25 +0000)
* tools/bundle-v3-scripts.py:
(main):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202008 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/tools/bundle-v3-scripts.py

index a2f563c..4bee32b 100644 (file)
@@ -1,5 +1,12 @@
 2016-06-13  Ryosuke Niwa  <rniwa@webkit.org>
 
+        Build fix. Strip out "use strict" everywhere so that the perf dashboard works on the shipping Safari.
+
+        * tools/bundle-v3-scripts.py:
+        (main):
+
+2016-06-13  Ryosuke Niwa  <rniwa@webkit.org>
+
         Invalid token error when trying to create an A/B analysis for a range
         https://bugs.webkit.org/show_bug.cgi?id=158679
 
index 2fd6187..0bb24a2 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import os
+import re
 import subprocess
 import sys
 import xml.dom.minidom
@@ -20,7 +21,9 @@ def main(argv):
         for script in unbundled_scripts:
             src = script.getAttribute('src')
             with open(os.path.join(public_v3_dir, src)) as script_file:
-                bundled_script += script_file.read()
+                script_content = script_file.read()
+                script_content = re.sub(r'([\"\'])use strict\1;', '', script_content)
+                bundled_script += script_content
 
     jsmin = subprocess.Popen(['python', os.path.join(tools_dir, 'jsmin.py')], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
     minified_script = jsmin.communicate(input=bundled_script)[0]