fix(repl): don't terminate on unhandled error events (#15548)

This commit is contained in:
Nayeem Rahman 2022-09-02 11:43:39 +01:00 committed by GitHub
parent 658d2cdff2
commit a74b2ecf37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 76 additions and 44 deletions

View file

@ -8,6 +8,7 @@
((window) => {
const core = window.Deno.core;
const ops = core.ops;
const webidl = window.__bootstrap.webidl;
const { DOMException } = window.__bootstrap.domException;
const consoleInternal = window.__bootstrap.console;
@ -1451,7 +1452,7 @@
});
// Avoid recursing `reportException()` via error handlers more than once.
if (reportExceptionStackedCalls > 1 || window.dispatchEvent(event)) {
core.terminate(error);
ops.op_dispatch_exception(error);
}
reportExceptionStackedCalls--;
}