summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/throwingOnerror_worker.js
blob: 07e01787bdabf138e67cb4eba9d4fb90f8451543 (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("");
};