fineProperty(badError, "name", { get() { throw exceptionToThrow; } });

  const worker = new Worker("./resources/echo-worker.js");
  t.add_cleanup(() => worker.terminate());

  assert_throws_exactly(exceptionToThrow, () => {
    worker.postMessage(badError);
  });
}, "Throwing name getter fails serialization");

// https://bugs.chromium.org/p/chromium/issues/detail?id=1030086
// https://github.com/whatwg/html/pull/5150
async_test(t => {
  window.onmessage = t.step_func_done(e => {
    assert_equals(e.data.n