summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/SharedWorker-replace-EventHandler.any.js
blob: 90c7d2d08d17a53cc953a602afa7ae999f44b37c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// META: global=sharedworker
// https://crbug.com/239669
const t = async_test("Tests that repeatedly setting 'onerror' within a shared worker doesnt crash.");
onconnect = t.step_func_done((event) => {
  function update() {
    onerror = undefined;
  }
  try {
    for (var i = 0; i < 8; ++i) {
      update();
    }
  } catch (ex) {
    assert_unreached("FAIL: unexpected exception (" + ex + ") received while updating onerror event handler.");
  }
});