Bug 1263256 - Silence startup JavaScript strict warning in chrome://browser/content/newtab/newTab.js. r=MattN
authorJonathan Watt <jwatt@jwatt.org>
Fri, 08 Apr 2016 18:32:14 +0100
changeset 331148 8d3682b0fc5b451fc9a13a917c7387e3f5afec88
parent 331147 a5b52c5e3c9619a3879e98d9e3cc54bac0ed88d9
child 331149 f901f3d964ab49279493fc66b51d1a788a666bb8
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1263256
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1263256 - Silence startup JavaScript strict warning in chrome://browser/content/newtab/newTab.js. r=MattN
browser/base/content/newtab/sites.js
--- a/browser/base/content/newtab/sites.js
+++ b/browser/base/content/newtab/sites.js
@@ -120,17 +120,17 @@ Site.prototype = {
       this.node.removeAttribute("pinned");
       control.setAttribute("title", newTabString("pin"));
     }
   },
 
   _newTabString: function(str, substrArr) {
     let regExp = /%[0-9]\$S/g;
     let matches;
-    while (matches = regExp.exec(str)) {
+    while ((matches = regExp.exec(str))) {
       let match = matches[0];
       let index = match.charAt(1); // Get the digit in the regExp.
       str = str.replace(match, substrArr[index - 1]);
     }
     return str;
   },
 
   _getSuggestedTileExplanation: function() {