2 <script src=
"../../resources/js-test.js"></script>
3 <script src=
"resources/worker-create-common.js"></script>
5 description("Test GCing of WorkerGlobalScope supplementable");
6 window
.jsTestIsAsync
= true;
7 if (window
.testRunner
) {
8 testRunner
.dumpAsText();
9 testRunner
.waitUntilDone();
13 if (window
.GCController
)
14 return GCController
.collect();
16 for (var i
= 0; i
< 10000; i
++) { // > force garbage collection (FF requires about 9K allocations before a collect)
17 var s
= new String("abc");
21 // Test that garbage collection of 'supplements' that extend the
22 // WorkerGlobalScope object is well behaved.
23 var worker
= createWorker();
28 worker
.postMessage("eval gc(); self.performance && self.performance.now()");
30 worker
.onmessage = function (e
) {