Error reporting in HostEnqueuePromiseJob is not specified nor interoperable #10526
Labels
interop
Implementations are not interoperable with each other
topic: error reporting
topic: shadow
Relates to shadow trees (as defined in DOM)
What is the issue with the HTML Standard?
There is a fringe case (#10404 (comment)) that is underspecified -- which global, if any, receives an
error
event the job passed to the HostEnqueuePromiseJob hook completes abruptly, but the realm is null.This can be achieved (in the NewPromiseReactionJob case) by subclassing Promise to inject a custom resolve function which succeeds the first time (allowing a promise of this type to be created) and then throws the next time, inside
then(null)
, which leads to such an abrupt completion with no realm. If these odd things are spread across realms (e.g., with same-origin frames) then it's not clear which global the error event ought to go to.Major browsers to different things in this extreme edge case. It's unlikely to affect web content in the wild, but would be nice to nail down anyhow.
The text was updated successfully, but these errors were encountered: