Skip to content

Error reporting in HostEnqueuePromiseJob is not specified nor interoperable #10526

Description

@jeremyroman

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interopImplementations are not interoperable with each othertopic: error reportingtopic: shadowRelates to shadow trees (as defined in DOM)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions