diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2021-10-01 10:30:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-01 11:30:55 +0200 |
commit | b354eaa2475a16f66e99efc82bebf5bd620406e4 (patch) | |
tree | aa8d15ba548032e44834bb736b1d32882bf60688 /runtime/js/11_workers.js | |
parent | c0b6c0eea59f0bea0ab12b2949a7c37c1a774293 (diff) |
fix(runtime/js/workers): throw errors instead of using an op (#12249)
Diffstat (limited to 'runtime/js/11_workers.js')
-rw-r--r-- | runtime/js/11_workers.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js index 2b908b9f8..59ae7371d 100644 --- a/runtime/js/11_workers.js +++ b/runtime/js/11_workers.js @@ -14,7 +14,6 @@ } = window.__bootstrap.primordials; const webidl = window.__bootstrap.webidl; const { URL } = window.__bootstrap.url; - const { Window } = window.__bootstrap.globalInterfaces; const { getLocationHref } = window.__bootstrap.location; const { log, pathFromURL } = window.__bootstrap.util; const { defineEventHandler } = window.__bootstrap.webUtil; @@ -265,14 +264,7 @@ } /* falls through */ case 2: { // Error if (!this.#handleError(data)) { - if (globalThis instanceof Window) { - throw new Error("Unhandled error event reached main worker."); - } else { - core.opSync( - "op_worker_unhandled_error", - data.message, - ); - } + throw new Error("Unhandled error event in child worker."); } break; } |