mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 13:56:29 +00:00
Bug 472585 - 'Workers: 'importScripts()' with no args throws an exception against spec'. r+sr+a=sicking.
This commit is contained in:
parent
ebb42f9d99
commit
9e4c216172
@ -211,8 +211,8 @@ nsDOMWorkerFunctions::LoadScripts(JSContext* aCx,
|
||||
}
|
||||
|
||||
if (!aArgc) {
|
||||
JS_ReportError(aCx, "Function must have at least one argument!");
|
||||
return JS_FALSE;
|
||||
// No argument is ok according to spec.
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
nsAutoTArray<nsString, 10> urls;
|
||||
|
@ -1,3 +1,6 @@
|
||||
// Try no args. This shouldn't do anything.
|
||||
importScripts();
|
||||
|
||||
onmessage = function(event) {
|
||||
switch (event.data) {
|
||||
case 'start':
|
||||
|
@ -29,13 +29,13 @@ Tests of DOM Worker Threads (Bug 437152)
|
||||
SimpleTest.finish();
|
||||
break;
|
||||
default:
|
||||
ok(false, "Unexpected message:" + message);
|
||||
ok(false, "Unexpected message:" + event.data);
|
||||
SimpleTest.finish();
|
||||
}
|
||||
};
|
||||
|
||||
worker.onerror = function(event) {
|
||||
ok(false, "Worker had an error:" + event.data);
|
||||
ok(false, "Worker had an error:" + event.message);
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user