WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
201005
[JSC] Prune about-to-be-notified rejected promises list at GC flip
https://bugs.webkit.org/show_bug.cgi?id=201005
Summary
[JSC] Prune about-to-be-notified rejected promises list at GC flip
Ross Kirsling
Reported
2019-08-21 16:09:20 PDT
From
bug 197172 comment 36
:
> If you have a loop with: > > let p = new Promise((resolve, reject) => { > ... > reject(p) > });
>
> p will be kept alive until the the microtasks are drained. Which means programs will OOM if they never drain all their microtasks...
>
> I think, at least, you'll need to clear handled promises at the GC flip. See where we call finalizeUnconditionalFinalizers.
Given the WHATWG spec*, I don't believe this is something we can address for the normal, web-hosted case (i.e. the "unhandledrejection" event), but it would be a possible improvement for rejection tracking in a standalone JSContext (which has no spec). [*]
https://html.spec.whatwg.org/multipage/webappapis.html#unhandled-promise-rejections
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug