Bug 1299256 - Fix performance issues when stripping comments from large locale files. r=rpl, a=gchang
authorKris Maglione <maglione.k@gmail.com>
Tue, 30 Aug 2016 12:24:23 -0700
changeset 342551 d73202a4a0cd884753e0ee9d025f74cddabe0d19
parent 342550 58ec38e8bfd60fd8e5152907ead5f2ed831f5192
child 342552 fd60cb8cc6a46c13b6622cd82c9fcaf531c7415f
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrpl, gchang
bugs1299256
milestone49.0
Bug 1299256 - Fix performance issues when stripping comments from large locale files. r=rpl, a=gchang MozReview-Commit-ID: H7IfBnQ4KnO
toolkit/components/extensions/Extension.jsm
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -103,18 +103,18 @@ var {
 } = ExtensionUtils;
 
 const LOGGER_ID_BASE = "addons.webextension.";
 
 const COMMENT_REGEXP = new RegExp(String.raw`
     ^
     (
       (?:
-        [^"] |
-        " (?:[^"\\] | \\.)* "
+        [^"\n] |
+        " (?:[^"\\\n] | \\.)* "
       )*?
     )
 
     //.*
   `.replace(/\s+/g, ""), "gm");
 
 var scriptScope = this;