Bug 1133279 - Remove nonstandard let blocks from toolkit/mozapps/extensions. r=Mossop
authorChris Peterson <cpeterson@mozilla.com>
Thu, 05 Feb 2015 22:54:56 -0800
changeset 229594 3b080c1a621cb2d573dfee2d0fd18944c08bdf8d
parent 229593 2c39507285afc6eb254f5248a4e70cc4dc5252f1
child 229595 433fc2a17d02969958d4d84329b0dbc76a4290c8
push id55737
push usercpeterson@mozilla.com
push dateWed, 18 Feb 2015 05:05:42 +0000
treeherdermozilla-inbound@946b11555d66 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop
bugs1133279
milestone38.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 1133279 - Remove nonstandard let blocks from toolkit/mozapps/extensions. r=Mossop
toolkit/mozapps/extensions/test/browser/cancelCompatCheck.sjs
toolkit/mozapps/extensions/test/xpcshell/head_addons.js
--- a/toolkit/mozapps/extensions/test/browser/cancelCompatCheck.sjs
+++ b/toolkit/mozapps/extensions/test/browser/cancelCompatCheck.sjs
@@ -25,20 +25,19 @@ function handleRequest(req, resp) {
 
   // The delay can be passed on the query string
   let delay = req.queryString + 0;
 
   timer = Components.classes["@mozilla.org/timer;1"].
           createInstance(Components.interfaces.nsITimer);
   timer.init(function sendFile() {
     dump("cancelCompatCheck: starting to send file\n");
-    let (str = {}) {
-      let read = 0;
-      do {
-        // read as much as we can and put it in str.value
-        read = cstream.readString(0xffffffff, str);
-        resp.write(str.value);
-      } while (read != 0);
-    }
+    let str = {};
+    let read = 0;
+    do {
+      // read as much as we can and put it in str.value
+      read = cstream.readString(0xffffffff, str);
+      resp.write(str.value);
+    } while (read != 0);
     cstream.close();
     resp.finish();
   }, delay, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -1570,24 +1570,23 @@ function interpolateAndServeFile(request
     var data = "";
     var fstream = Components.classes["@mozilla.org/network/file-input-stream;1"].
     createInstance(Components.interfaces.nsIFileInputStream);
     var cstream = Components.classes["@mozilla.org/intl/converter-input-stream;1"].
     createInstance(Components.interfaces.nsIConverterInputStream);
     fstream.init(file, -1, 0, 0);
     cstream.init(fstream, "UTF-8", 0, 0);
 
-    let (str = {}) {
-      let read = 0;
-      do {
-        // read as much as we can and put it in str.value
-        read = cstream.readString(0xffffffff, str);
-        data += str.value;
-      } while (read != 0);
-    }
+    let str = {};
+    let read = 0;
+    do {
+      // read as much as we can and put it in str.value
+      read = cstream.readString(0xffffffff, str);
+      data += str.value;
+    } while (read != 0);
     data = data.replace(/%PORT%/g, gPort);
 
     response.write(data);
   } catch (e) {
     do_throw("Exception while serving interpolated file.");
   } finally {
     cstream.close(); // this closes fstream as well
   }
@@ -1649,23 +1648,22 @@ function changeXPIDBVersion(aNewVersion)
 function loadFile(aFile) {
   let data = "";
   let fstream = Components.classes["@mozilla.org/network/file-input-stream;1"].
           createInstance(Components.interfaces.nsIFileInputStream);
   let cstream = Components.classes["@mozilla.org/intl/converter-input-stream;1"].
           createInstance(Components.interfaces.nsIConverterInputStream);
   fstream.init(aFile, -1, 0, 0);
   cstream.init(fstream, "UTF-8", 0, 0);
-  let (str = {}) {
-    let read = 0;
-    do {
-      read = cstream.readString(0xffffffff, str); // read as much as we can and put it in str.value
-      data += str.value;
-    } while (read != 0);
-  }
+  let str = {};
+  let read = 0;
+  do {
+    read = cstream.readString(0xffffffff, str); // read as much as we can and put it in str.value
+    data += str.value;
+  } while (read != 0);
   cstream.close();
   return data;
 }
 
 /**
  * Raw load of a JSON file
  */
 function loadJSON(aFile) {