[Webkit-unassigned] [Bug 201005] New: [JSC] Prune about-to-be-notified rejected promises list at GC flip

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 21 16:09:20 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=201005

            Bug ID: 201005
           Summary: [JSC] Prune about-to-be-notified rejected promises
                    list at GC flip
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ross.kirsling at sony.com

>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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190821/a4c502bc/attachment.html>


More information about the webkit-unassigned mailing list