Disallow execution of functions created by a detached context |
||
Issue descriptionWe should experiment with disallowing execution of functions created by a context which is detached. Based on the attached test case, the current behavior between different browsers is: - Edge: disallows - Firefox: allows - Chrome: allows having this would be nice for two reasons: - it would enable us to more aggressively prune memory for navigated contexts - it would let us be consistent about how to treat microtasks in a detached context. otherwise, it could result in strange behavior where executing an async function would never complete (if we dropped microtasks). Though now that I think about this more... if we execute an async function on a detached context today... does that work?
,
Oct 23
Re: #1 yeah, I was surprised by this yesterday on https://chromium-review.googlesource.com/c/chromium/src/+/1288674/3 -- a promise rejected after the associated context is already detached never invokes its reject handler.
,
Nov 6
Toon: Would you mind creating a V8 side patch to throw an exception when a function is going to be executed on a detached global window? I want to send it to Finch and see how it goes.
,
Nov 7
I don't have cycles for this right now, but I'll get back to this in Q1. |
||
►
Sign in to add a comment |
||
Comment 1 by haraken@chromium.org
, Oct 23