1 function runPromisesInWorker()
3 Promise.reject(new Error("err1"))
6 .then(); // Last is unhandled.
9 var m0 = new Promise(function(res, rej) { reject = rej; });
10 var m1 = m0.then(function() {});
11 var m2 = m0.then(function() {});
12 var m3 = m0.then(function() {});
17 m4 = m3.then(function() {}); // Unhandled.
21 reject(new Error("err2"));
24 onmessage = function(event) {
25 runPromisesInWorker();
26 setInterval(doWork, 0);
31 postMessage("Message #" + message_id++);