Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
xwan99 opened this issue Sep 16, 2024 · 4 comments
Closed
Labels
abortcontroller Issues and PRs related to the AbortController API web-standards Issues and PRs related to Web APIs

Comments

@xwan99
Copy link

xwan99 commented Sep 16, 2024

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

@RedYetiDev RedYetiDev added abortcontroller Issues and PRs related to the AbortController API web-standards Issues and PRs related to Web APIs labels Sep 16, 2024
@RedYetiDev
Copy link
Member

RedYetiDev commented Sep 16, 2024

@RedYetiDev
Copy link
Member

Can you provide the exact error given by other runtimes?

@xwan99
Copy link
Author

xwan99 commented Sep 16, 2024

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

@benjamingr
Copy link
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

nodejs-github-bot pushed a commit that referenced this issue Sep 29, 2024
PR-URL: #54965
Fixes: #54962
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
louwers pushed a commit to louwers/node that referenced this issue Nov 2, 2024
PR-URL: nodejs#54965
Fixes: nodejs#54962
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
louwers pushed a commit to louwers/node that referenced this issue Nov 2, 2024
PR-URL: nodejs#54965
Fixes: nodejs#54962
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
tpoisseau pushed a commit to tpoisseau/node that referenced this issue Nov 21, 2024
PR-URL: nodejs#54965
Fixes: nodejs#54962
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
tpoisseau pushed a commit to tpoisseau/node that referenced this issue Nov 21, 2024
PR-URL: nodejs#54965
Fixes: nodejs#54962
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abortcontroller Issues and PRs related to the AbortController API web-standards Issues and PRs related to Web APIs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants