summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/throwingOnerror_worker.js
blob: 47b727f56a24f4ac87365a8b457fbe5bd3b9cc25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/
 */
onerror = function (event) {
  throw "bar";
};

var count = 0;
onmessage = function (event) {
  if (!count++) {
    throw "foo";
  }
  postMessage("");
};