Skip to content

lib: make AbortSignal.timeout() parameter handling spec-compliant#62997

Closed
Renegade334 wants to merge 1 commit intonodejs:mainfrom
Renegade334:abortsignal-timeout-enforcerange
Closed

lib: make AbortSignal.timeout() parameter handling spec-compliant#62997
Renegade334 wants to merge 1 commit intonodejs:mainfrom
Renegade334:abortsignal-timeout-enforcerange

Conversation

@Renegade334
Copy link
Copy Markdown
Member

We currently validate the argument to AbortSignal.timeout() as a uint32, whereas the specification dictates that this be converted to an integer and then validated as a uint64. Not sure how many users are clamouring for an AbortSignal that aborts during the next ice age, but the coercion behaviour is something we should definitely be implementing.

Refs: https://dom.spec.whatwg.org/#ref-for-dom-abortsignal-timeout
Fixes: #58592

@Renegade334 Renegade334 added the web-standards Issues and PRs related to Web APIs label Apr 27, 2026
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Apr 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.66%. Comparing base (0a9b67e) to head (5f4ee7f).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62997      +/-   ##
==========================================
+ Coverage   89.64%   89.66%   +0.01%     
==========================================
  Files         707      707              
  Lines      219506   219509       +3     
  Branches    42087    42085       -2     
==========================================
+ Hits       196782   196817      +35     
+ Misses      14625    14587      -38     
- Partials     8099     8105       +6     
Files with missing lines Coverage Δ
lib/internal/abort_controller.js 95.29% <100.00%> (ø)

... and 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

needs-ci PRs that need a full CI run. web-standards Issues and PRs related to Web APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AbortSignal.timeout throws RangeError with any decimal number input

2 participants