mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1010784: Null out sync loop target to avoid assertions when reusing sync XHR. r=khuey
This commit is contained in:
parent
5fdb919065
commit
7070951543
@ -954,6 +954,7 @@ Proxy::Teardown()
|
||||
}
|
||||
|
||||
mWorkerPrivate = nullptr;
|
||||
mSyncLoopTarget = nullptr;
|
||||
mOutstandingSendCount = 0;
|
||||
}
|
||||
|
||||
@ -1106,6 +1107,7 @@ LoadStartDetectionRunnable::Run()
|
||||
mXMLHttpRequestPrivate, mChannelId);
|
||||
if (runnable->Dispatch(nullptr)) {
|
||||
mProxy->mWorkerPrivate = nullptr;
|
||||
mProxy->mSyncLoopTarget = nullptr;
|
||||
mProxy->mOutstandingSendCount--;
|
||||
}
|
||||
}
|
||||
|
9
dom/workers/test/file_bug1010784_worker.js
Normal file
9
dom/workers/test/file_bug1010784_worker.js
Normal file
@ -0,0 +1,9 @@
|
||||
onmessage = function(event) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
|
||||
xhr.open("GET", event.data, false);
|
||||
xhr.send();
|
||||
xhr.open("GET", event.data, false);
|
||||
xhr.send();
|
||||
postMessage("done");
|
||||
}
|
@ -15,6 +15,7 @@ support-files =
|
||||
errorwarning_worker.js
|
||||
eventDispatch_worker.js
|
||||
fibonacci_worker.js
|
||||
file_bug1010784_worker.js
|
||||
importScripts_worker.js
|
||||
importScripts_worker_imported1.js
|
||||
importScripts_worker_imported2.js
|
||||
@ -74,6 +75,7 @@ support-files =
|
||||
[test_blobConstructor.html]
|
||||
[test_blobWorkers.html]
|
||||
[test_bug949946.html]
|
||||
[test_bug1010784.html]
|
||||
[test_chromeWorker.html]
|
||||
[test_clearTimeouts.html]
|
||||
[test_close.html]
|
||||
|
35
dom/workers/test/test_bug1010784.html
Normal file
35
dom/workers/test/test_bug1010784.html
Normal file
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1010784
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1010784</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1010784">Mozilla Bug 1010784</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
var worker = new Worker("file_bug1010784_worker.js");
|
||||
|
||||
worker.onmessage = function(event) {
|
||||
is(event.data, "done", "Got correct result");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
worker.postMessage("testXHR.txt");
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user