Bug 599751 - Javascript strict warnings in nsSearchService.js; (Av1a) Add 2 missing 'let'.
authorSerge Gautherie <sgautherie.bz@free.fr>
Mon, 18 Oct 2010 08:43:35 +0200
changeset 55990 c00f150e33d8337b2baba26988a7a9a6a2f103f4
parent 55989 22028fb65bb26818a7686a8afe153c35cedce071
child 55991 36aa9c19420eccfba960a5c7c656ccc26f5c2e62
push id16361
push usersgautherie.bz@free.fr
push dateMon, 18 Oct 2010 06:52:59 +0000
treeherdermozilla-central@c00f150e33d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs599751
milestone2.0b8pre
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 599751 - Javascript strict warnings in nsSearchService.js; (Av1a) Add 2 missing 'let'. r+a-2.0=gavin.sharp.
toolkit/components/search/nsSearchService.js
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -1862,29 +1862,29 @@ Engine.prototype = {
           // quoted attribute.
           var betweenEqualAndQuote = lLine.substring(valueStart, quoteStart);
           if (/\S/.test(betweenEqualAndQuote))
             return lLine.substr(valueStart).replace(/\s.*$/, "");
 
           // Adjust the start index to account for the opening quote
           valueStart = quoteStart + "\"".length;
           // Find the closing quote
-          valueEnd = lLine.indexOf("\"", valueStart);
+          let valueEnd = lLine.indexOf("\"", valueStart);
           // If there is no closing quote, just go to the end of the line
           if (valueEnd == -1)
             valueEnd = aLine.length;
         }
         return aLine.substring(valueStart, valueEnd);
       }
 
       var inputs = [];
 
       LOG("_parseAsSherlock::getInputs: Lines:\n" + aLines);
       // Filter out everything but non-inputs
-      lines = aLines.filter(function (line) {
+      let lines = aLines.filter(function (line) {
         return /^\s*<input/i.test(line);
       });
       LOG("_parseAsSherlock::getInputs: Filtered lines:\n" + lines);
 
       lines.forEach(function (line) {
         // Strip leading/trailing whitespace and remove the surrounding markup
         // ("<input" and ">")
         line = line.trim().replace(/^<input/i, "").replace(/>$/, "");