Skip to content

{aborted: false} is treated as valid AbortSignal but not in other runtimes #54962

Description

@xwan99

Version

v22.8.0

Platform

N/A

Subsystem

abort controller

What steps will reproduce the bug?

AbortSignal.any([ { aborted: false }])

How often does it reproduce? Is there a required condition?

100%

What is the expected behavior? Why is that the expected behavior?

Fail with TypeError

What do you see instead?

Passed

Additional information

This fails in other runtime like Chrome and Firefox

Activity

  1. added
    abortcontrollerIssues and PRs related to the AbortController and AbortSignal APIs.
    web-standardsIssues and PRs related to web-platform APIs and standards compliance.
    on Sep 16, 2024
  2. avivkeller commented on Sep 16, 2024

    @avivkeller
    Member
  3. avivkeller commented on Sep 16, 2024

    @avivkeller
    Member

    Can you provide the exact error given by other runtimes?

  4. xwan99 commented on Sep 16, 2024

    @xwan99
    Author

    In Firefox:

    >> AbortSignal.any([ { aborted: false }])
    Uncaught TypeError: AbortSignal.any: Element of argument 1 does not implement interface AbortSignal.
        <anonymous> debugger eval code:1
    

    In Chrome:

    > AbortSignal.any([ { aborted: false }])
    
    VM176:1 Uncaught TypeError: Failed to execute 'any' on 'AbortSignal': Failed to convert value to 'AbortSignal'.
        at <anonymous>:1:13
    
  5. benjamingr commented on Sep 19, 2024

    @benjamingr
    Member

    This was a deliberate design choice (to not brand check) in order to have better ecosystem compatibility.

    Now that we've had AbortSignal for a few years it's fine to revisit

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

    abortcontrollerIssues and PRs related to the AbortController and AbortSignal APIs.web-standardsIssues and PRs related to web-platform APIs and standards compliance.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions