зеркало из https://github.com/mozilla/pjs.git
Bug 521189 - Some necko unit tests fail or hang with 'strict' & 'werror' on. r=jwalden
This commit is contained in:
Родитель
77efbf0b5d
Коммит
15a8baae3b
|
@ -458,7 +458,7 @@ nsHttpServer.prototype =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
gThreadManager.currentThread
|
gThreadManager.currentThread
|
||||||
.dispatch(stopEvent, Ci.nsIThreadManager.DISPATCH_NORMAL);
|
.dispatch(stopEvent, Ci.nsIThread.DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2599,7 +2599,7 @@ ServerHandler.prototype =
|
||||||
// Seek (or read, if seeking isn't supported) to the correct offset so
|
// Seek (or read, if seeking isn't supported) to the correct offset so
|
||||||
// the data sent to the client matches the requested range.
|
// the data sent to the client matches the requested range.
|
||||||
if (fis instanceof Ci.nsISeekableStream)
|
if (fis instanceof Ci.nsISeekableStream)
|
||||||
fis.seek(Ci.nsISeekableStream.SEEK_SET, offset);
|
fis.seek(Ci.nsISeekableStream.NS_SEEK_SET, offset);
|
||||||
else
|
else
|
||||||
new ScriptableInputStream(fis).read(offset);
|
new ScriptableInputStream(fis).read(offset);
|
||||||
}
|
}
|
||||||
|
@ -2613,7 +2613,7 @@ ServerHandler.prototype =
|
||||||
function writeMore()
|
function writeMore()
|
||||||
{
|
{
|
||||||
gThreadManager.currentThread
|
gThreadManager.currentThread
|
||||||
.dispatch(writeData, Ci.nsIThreadManager.DISPATCH_NORMAL);
|
.dispatch(writeData, Ci.nsIThread.DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
var input = new BinaryInputStream(fis);
|
var input = new BinaryInputStream(fis);
|
||||||
|
@ -3688,7 +3688,7 @@ Response.prototype =
|
||||||
dumpn("*** canceling copy asynchronously...");
|
dumpn("*** canceling copy asynchronously...");
|
||||||
copier.cancel(Cr.NS_ERROR_UNEXPECTED);
|
copier.cancel(Cr.NS_ERROR_UNEXPECTED);
|
||||||
}
|
}
|
||||||
}, Ci.nsIThreadManager.DISPATCH_NORMAL);
|
}, Ci.nsIThread.DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3993,7 +3993,7 @@ WriteThroughCopier.prototype =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
gThreadManager.currentThread
|
gThreadManager.currentThread
|
||||||
.dispatch(cancelEvent, Ci.nsIThreadManager.DISPATCH_NORMAL);
|
.dispatch(cancelEvent, Ci.nsIThread.DISPATCH_NORMAL);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -75,7 +75,7 @@ function createTestDirectory()
|
||||||
// populate with test directories, files, etc.
|
// populate with test directories, files, etc.
|
||||||
// Files must be in expected order of display on the index page!
|
// Files must be in expected order of display on the index page!
|
||||||
|
|
||||||
files = [];
|
var files = [];
|
||||||
|
|
||||||
makeFile("aa_directory", true, dir, files);
|
makeFile("aa_directory", true, dir, files);
|
||||||
makeFile("Ba_directory", true, dir, files);
|
makeFile("Ba_directory", true, dir, files);
|
||||||
|
@ -179,7 +179,7 @@ function hiddenDataCheck(bytes, uri, path)
|
||||||
|
|
||||||
do_check_eq(link.textContent, f.name + sep);
|
do_check_eq(link.textContent, f.name + sep);
|
||||||
|
|
||||||
var uri = ios.newURI(link.getAttribute("href"), null, top);
|
uri = ios.newURI(link.getAttribute("href"), null, top);
|
||||||
do_check_eq(decodeURIComponent(uri.path), path + f.name + sep);
|
do_check_eq(decodeURIComponent(uri.path), path + f.name + sep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@ function dataCheck(bytes, uri, path, dirEntries)
|
||||||
|
|
||||||
do_check_eq(link.textContent, f.name + sep);
|
do_check_eq(link.textContent, f.name + sep);
|
||||||
|
|
||||||
var uri = ios.newURI(link.getAttribute("href"), null, top);
|
uri = ios.newURI(link.getAttribute("href"), null, top);
|
||||||
do_check_eq(decodeURIComponent(uri.path), path + f.name + sep);
|
do_check_eq(decodeURIComponent(uri.path), path + f.name + sep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,7 +358,7 @@ function handleAsyncOrdering(request, response)
|
||||||
// intended for public use! If you do this in client code, expect me to
|
// intended for public use! If you do this in client code, expect me to
|
||||||
// knowingly break your code by changing the variable name. :-P
|
// knowingly break your code by changing the variable name. :-P
|
||||||
gThreadManager.currentThread
|
gThreadManager.currentThread
|
||||||
.dispatch(writeData, Ci.nsIThreadManager.DISPATCH_NORMAL);
|
.dispatch(writeData, Ci.nsIThread.DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
step();
|
step();
|
||||||
response.processAsync();
|
response.processAsync();
|
||||||
|
|
|
@ -86,7 +86,7 @@ function callASAPLater(fun)
|
||||||
{
|
{
|
||||||
fun();
|
fun();
|
||||||
}
|
}
|
||||||
}, Ci.nsIThreadManager.DISPATCH_NORMAL);
|
}, Ci.nsIThread.DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -274,11 +274,11 @@ tests.push(test);
|
||||||
|
|
||||||
data = "GET /thrown-exception?writeBeforeEmpty HTTP/1.0\r\n" +
|
data = "GET /thrown-exception?writeBeforeEmpty HTTP/1.0\r\n" +
|
||||||
"\r\n";
|
"\r\n";
|
||||||
function checkThrownExceptionWriteBefore(data)
|
function checkThrownExceptionWriteBeforeEmpty(data)
|
||||||
{
|
{
|
||||||
do_check_eq(data, "preparing to throw...");
|
do_check_eq(data, "preparing to throw...");
|
||||||
}
|
}
|
||||||
test = new RawTest("localhost", PORT, data, checkThrownExceptionWriteBefore),
|
test = new RawTest("localhost", PORT, data, checkThrownExceptionWriteBeforeEmpty),
|
||||||
tests.push(test);
|
tests.push(test);
|
||||||
|
|
||||||
data = "GET /thrown-exception HTTP/1.0\r\n" +
|
data = "GET /thrown-exception HTTP/1.0\r\n" +
|
||||||
|
|
|
@ -30,7 +30,7 @@ function firstTimeThrough(request, buffer)
|
||||||
{
|
{
|
||||||
do_check_eq(buffer, responseBody);
|
do_check_eq(buffer, responseBody);
|
||||||
var chan = make_channel(randomURI);
|
var chan = make_channel(randomURI);
|
||||||
chan.loadFlags |= Ci.nsICachingChannel.LOAD_FROM_CACHE;
|
chan.loadFlags |= Ci.nsIRequest.LOAD_FROM_CACHE;
|
||||||
chan.asyncOpen(new ChannelListener(finish_test, null), null);
|
chan.asyncOpen(new ChannelListener(finish_test, null), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -320,7 +320,7 @@ function handleAuth(metadata, response) {
|
||||||
// /auth
|
// /auth
|
||||||
function authHandler(metadata, response) {
|
function authHandler(metadata, response) {
|
||||||
response.setHeader("Content-Type", "text/html", false);
|
response.setHeader("Content-Type", "text/html", false);
|
||||||
body = handleAuth(metadata, response) ? "success" : "failure";
|
var body = handleAuth(metadata, response) ? "success" : "failure";
|
||||||
response.bodyOutputStream.write(body, body.length);
|
response.bodyOutputStream.write(body, body.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче