Skip to content

fix(events): align addAbortListener ext provider#4419

Merged
proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-events-add-abort-listener
Jun 4, 2026
Merged

fix(events): align addAbortListener ext provider#4419
proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-events-add-abort-listener

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

@andrewtdiz andrewtdiz commented Jun 4, 2026

Summary

  • validate events.addAbortListener() signal/listener arguments through Node-compatible ERR_INVALID_ARG_TYPE paths
  • attach abort listeners through the ext events provider NaN-boxed module-helper ABI so abort dispatch fires
  • return a disposable object with Symbol.dispose cleanup that removes the registered abort listener

Issue

Part of #2013

Tests

  • cargo check -p perry-ext-events
  • cargo fmt --all -- --check
  • git diff --check
  • ./scripts/check_file_size.sh
  • npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module events --filter add-abort-listener' (3 pass, 0 fail, 0 compile fail)
  • npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module events --filter event-target' (2 pass, 0 fail, 0 compile fail)

Non-goals

  • events.on() / events.once() abort behavior
  • broader EventEmitter compile/linkage cleanup
  • domain or stream integrations

# Conflicts:
#	crates/perry-ext-events/src/lib.rs
@proggeramlug proggeramlug marked this pull request as ready for review June 4, 2026 22:05
@proggeramlug proggeramlug merged commit 7d8b8c9 into PerryTS:main Jun 4, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants