summaryrefslogtreecommitdiff
path: root/runtime/js/99_main.js
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2022-08-21 19:16:42 +0100
committerGitHub <noreply@github.com>2022-08-21 20:16:42 +0200
commit97954003cc87b664768918173e8d00f6df35e04f (patch)
treedcad94ac57503ba56e8cd14847cc60b1c2ddc91c /runtime/js/99_main.js
parente96933bc163fd81a276cbc169b17f76724a5ac33 (diff)
feat: `queueMicrotask()` error handling (#15522)
Adds error event dispatching for queueMicrotask(). Consequently unhandled errors are now reported with Deno.core.terminate(), which is immune to the existing quirk with plainly thrown errors (#14158).
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r--runtime/js/99_main.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index cbc5c1b5b..b25022a08 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -76,7 +76,7 @@ delete Intl.v8BreakIterator;
const errors = window.__bootstrap.errors.errors;
const webidl = window.__bootstrap.webidl;
const domException = window.__bootstrap.domException;
- const { defineEventHandler } = window.__bootstrap.event;
+ const { defineEventHandler, reportException } = window.__bootstrap.event;
const { deserializeJsMessageData, serializeJsMessageData } =
window.__bootstrap.messagePort;
@@ -243,6 +243,7 @@ delete Intl.v8BreakIterator;
core.setMacrotaskCallback(timers.handleTimerMacrotask);
core.setMacrotaskCallback(promiseRejectMacrotaskCallback);
core.setWasmStreamingCallback(fetch.handleWasmStreaming);
+ core.setReportExceptionCallback(reportException);
ops.op_set_format_exception_callback(formatException);
version.setVersions(
runtimeOptions.denoVersion,