mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1133279 - Remove nonstandard let blocks from toolkit/mozapps/extensions. r=Mossop
This commit is contained in:
parent
8db771ea29
commit
645f8904ac
@ -30,14 +30,13 @@ function handleRequest(req, resp) {
|
|||||||
createInstance(Components.interfaces.nsITimer);
|
createInstance(Components.interfaces.nsITimer);
|
||||||
timer.init(function sendFile() {
|
timer.init(function sendFile() {
|
||||||
dump("cancelCompatCheck: starting to send file\n");
|
dump("cancelCompatCheck: starting to send file\n");
|
||||||
let (str = {}) {
|
let str = {};
|
||||||
let read = 0;
|
let read = 0;
|
||||||
do {
|
do {
|
||||||
// read as much as we can and put it in str.value
|
// read as much as we can and put it in str.value
|
||||||
read = cstream.readString(0xffffffff, str);
|
read = cstream.readString(0xffffffff, str);
|
||||||
resp.write(str.value);
|
resp.write(str.value);
|
||||||
} while (read != 0);
|
} while (read != 0);
|
||||||
}
|
|
||||||
cstream.close();
|
cstream.close();
|
||||||
resp.finish();
|
resp.finish();
|
||||||
}, delay, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
|
}, delay, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
|
||||||
|
@ -1575,14 +1575,13 @@ function interpolateAndServeFile(request, response) {
|
|||||||
fstream.init(file, -1, 0, 0);
|
fstream.init(file, -1, 0, 0);
|
||||||
cstream.init(fstream, "UTF-8", 0, 0);
|
cstream.init(fstream, "UTF-8", 0, 0);
|
||||||
|
|
||||||
let (str = {}) {
|
let str = {};
|
||||||
let read = 0;
|
let read = 0;
|
||||||
do {
|
do {
|
||||||
// read as much as we can and put it in str.value
|
// read as much as we can and put it in str.value
|
||||||
read = cstream.readString(0xffffffff, str);
|
read = cstream.readString(0xffffffff, str);
|
||||||
data += str.value;
|
data += str.value;
|
||||||
} while (read != 0);
|
} while (read != 0);
|
||||||
}
|
|
||||||
data = data.replace(/%PORT%/g, gPort);
|
data = data.replace(/%PORT%/g, gPort);
|
||||||
|
|
||||||
response.write(data);
|
response.write(data);
|
||||||
@ -1654,13 +1653,12 @@ function loadFile(aFile) {
|
|||||||
createInstance(Components.interfaces.nsIConverterInputStream);
|
createInstance(Components.interfaces.nsIConverterInputStream);
|
||||||
fstream.init(aFile, -1, 0, 0);
|
fstream.init(aFile, -1, 0, 0);
|
||||||
cstream.init(fstream, "UTF-8", 0, 0);
|
cstream.init(fstream, "UTF-8", 0, 0);
|
||||||
let (str = {}) {
|
let str = {};
|
||||||
let read = 0;
|
let read = 0;
|
||||||
do {
|
do {
|
||||||
read = cstream.readString(0xffffffff, str); // read as much as we can and put it in str.value
|
read = cstream.readString(0xffffffff, str); // read as much as we can and put it in str.value
|
||||||
data += str.value;
|
data += str.value;
|
||||||
} while (read != 0);
|
} while (read != 0);
|
||||||
}
|
|
||||||
cstream.close();
|
cstream.close();
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user