michael@0: var p = new Promise(function(resolve, reject) { michael@0: // This causes a runnable to be queued. michael@0: reject(new Error()); michael@0: postMessage("loaded"); michael@0: michael@0: // This prevents that runnable from running until the window calls terminate(), michael@0: // at which point the worker goes into the Canceling state and then an michael@0: // AddFeature() is attempted, which fails, which used to result in multiple michael@0: // calls to the error reporter, one after the worker's context had been GCed. michael@0: while (true); michael@0: });