Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JSC] Early return in microtask draining when termination happens
https://bugs.webkit.org/show_bug.cgi?id=257163 rdar://109401883 Reviewed by Mark Lam. This is Debug only, JSC shell only issue. Early returning from microtask draining when termination happens. * JSTests/stress/exception-check-unhandled-promise-rejection-in-shell.js: Added. (async foo): * Source/JavaScriptCore/runtime/VM.cpp: (JSC::VM::didExhaustMicrotaskQueue): (JSC::VM::drainMicrotasks): Canonical link: https://commits.webkit.org/264390@main
- Loading branch information
1 parent
6483fe3
commit 3201e5f
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
JSTests/stress/exception-check-unhandled-promise-rejection-in-shell.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//@ runDefault("--watchdog=100", "--watchdog-exception-ok") | ||
async function foo() { | ||
await undefined; | ||
throw new Error(); | ||
} | ||
|
||
setUnhandledRejectionCallback(foo); | ||
foo(); | ||
drainMicrotasks(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters