Bug 1133279 - Remove nonstandard let blocks from toolkit/mozapps/extensions. r=Mossop

This commit is contained in:
Chris Peterson 2015-02-05 22:54:56 -08:00
parent 348946b6c5
commit c7599bcbb3
2 changed files with 20 additions and 23 deletions

View File

@ -30,14 +30,13 @@ function handleRequest(req, resp) {
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);

View File

@ -1575,14 +1575,13 @@ function interpolateAndServeFile(request, response) {
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);
@ -1654,13 +1653,12 @@ function loadFile(aFile) {
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;
}