dom/workers/test/bug1020226_worker.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/workers/test/bug1020226_worker.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,11 @@
     1.4 +var p = new Promise(function(resolve, reject) {
     1.5 +  // This causes a runnable to be queued.
     1.6 +  reject(new Error());
     1.7 +  postMessage("loaded");
     1.8 +
     1.9 +  // This prevents that runnable from running until the window calls terminate(),
    1.10 +  // at which point the worker goes into the Canceling state and then an
    1.11 +  // AddFeature() is attempted, which fails, which used to result in multiple
    1.12 +  // calls to the error reporter, one after the worker's context had been GCed.
    1.13 +  while (true);
    1.14 +});

mercurial