Backed out changeset 62f7af8fe549 (bug 1843981) for causing valgrind bustage. CLOSED...
[gecko.git] / dom / xhr / tests / terminateSyncXHR_worker.js
blob7a2509af3db7aafb8e6b5f9893443aec2b73ea9f
1 /**
2  * Any copyright is dedicated to the Public Domain.
3  * http://creativecommons.org/publicdomain/zero/1.0/
4  */
6 onmessage = function (event) {
7   throw new Error("No messages should reach me!");
8 };
10 var xhr = new XMLHttpRequest();
11 xhr.open("GET", "worker_testXHR.txt", false);
12 xhr.addEventListener("loadstart", function () {
13   // Tell the parent to terminate us.
14   postMessage("TERMINATE");
15   // And wait for it to do so.
16   while (1) {
17     true;
18   }
19 });
20 xhr.send(null);