Bug 718260 - Fix a crash in DispatchPrematureAbortEvent; r=bent

This commit is contained in:
Ms2ger 2012-07-25 22:49:24 +02:00
parent 9ff2ccdd5f
commit ab0288a76e
2 changed files with 7 additions and 9 deletions

View File

@ -1604,10 +1604,14 @@ XMLHttpRequest::DispatchPrematureAbortEvent(JSObject* aTarget,
ErrorResult& aRv)
{
mWorkerPrivate->AssertIsOnWorkerThread();
MOZ_ASSERT(mProxy);
MOZ_ASSERT(aTarget);
MOZ_ASSERT(aEventType <= STRING_COUNT);
if (!mProxy) {
aRv.Throw(NS_ERROR_FAILURE);
return;
}
JSContext* cx = GetJSContext();
JSString* type = JS_NewStringCopyZ(cx, sEventStrings[aEventType]);

View File

@ -35,15 +35,9 @@ Tests of DOM Worker Threads XHR(Bug 450452 )
worker.postMessage("start");
}
SimpleTest.waitForExplicitFinish();
runTest();
const isWinXP = navigator.userAgent.indexOf("Windows NT 5.1") != -1;
if (isWinXP){
todo(false, "Test disabled on WinXP due to bug 718260 crashes");
SimpleTest.finish();
} else {
runTest();
}
SimpleTest.waitForExplicitFinish();
</script>
</pre>
</body>