2 <p>Test that worker object is not garbage collected if there is a message from
3 worker context. Should print
"SUCCESS".
4 <a href=
"https://bugs.webkit.org/show_bug.cgi?id=62446">Bug
62446</a></p>
9 document
.getElementById("result").innerHTML
+= message
+ "<br>";
14 if (window
.GCController
)
15 return GCController
.collect();
18 for (var i
= 0; i
< 10000; i
++) {
19 var newHead
= new Array(1000);
25 if (window
.testRunner
) {
26 testRunner
.dumpAsText();
27 testRunner
.waitUntilDone();
30 var interval
= setInterval(gc
, 0);
32 var worker
= new Worker('resources/worker-init.js');
33 worker
.onmessage = function(evt
) {
35 clearInterval(interval
);
36 if (window
.testRunner
)
37 testRunner
.notifyDone();