Bug 1339406 - Part 2: Add missing 'var' declarations for local variables in jstest harness functions. r=arai
authorAndré Bargull <andre.bargull@gmail.com>
Tue, 14 Feb 2017 10:26:09 -0800
changeset 342910 f34ed6a5b9cae8a4147fde4710ce7f9ec4933058
parent 342909 cce05a2b630810369ba6a342e2adcdc72e4dc32e
child 342911 fb11e452585acf4962614232a8c80da891896ad3
push id31366
push usercbook@mozilla.com
push dateWed, 15 Feb 2017 11:25:19 +0000
treeherdermozilla-central@c0807d6938c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai
bugs1339406
milestone54.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 1339406 - Part 2: Add missing 'var' declarations for local variables in jstest harness functions. r=arai
js/src/tests/browser.js
js/src/tests/shell.js
--- a/js/src/tests/browser.js
+++ b/js/src/tests/browser.js
@@ -535,17 +535,17 @@ function jsTestDriverBrowserInit()
   // XXX bc - the first document.written script is ignored if the protocol
   // is file:. insert an empty script tag, to work around it.
   document.write('<script></script>');
 
   // Output script tags for shell.js, then browser.js, at each level of the
   // test path hierarchy.
   var prepath = "";
   var i = 0;
-  for (end = testpathparts.length - 1; i < end; i++) {
+  for (var end = testpathparts.length - 1; i < end; i++) {
     prepath += testpathparts[i] + "/";
     outputscripttag(prepath + "shell.js", properties);
     outputscripttag(prepath + "browser.js", properties);
   }
 
   // Output the test script itself.
   outputscripttag(prepath + testpathparts[i], properties);
 
--- a/js/src/tests/shell.js
+++ b/js/src/tests/shell.js
@@ -865,17 +865,17 @@ function optionsPush()
 }
 
 function optionsPop()
 {
   var optionsframe = options.stackvalues.pop();
 
   optionsClear();
 
-  for (optionName in optionsframe)
+  for (var optionName in optionsframe)
   {
     options(optionName);
   }
 
 }
 
 function optionsReset() {