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 347969 a46345ccdae2f09ab412abe89ae28281419d0565
parent 347968 8fd9e2518fc2730431cca774b377ed5f7bf577fe
child 347970 3933108db994ae717529dd9df2c641e08b5c92f3
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrpl, gchang
bugs1299256
milestone50.0a2
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
@@ -76,18 +76,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;