Skip to content

Conversation

@kt3k
Copy link
Member

@kt3k kt3k commented Jun 6, 2025

This PR fixes events.addAbortListener API, and enables parallel/test-events-add-abort-listener.mjs

towards #29595

@kt3k kt3k force-pushed the fix-ext-node-abort-listener branch from 59afa87 to 2e89df1 Compare June 6, 2025 07:41
@kt3k kt3k mentioned this pull request Jun 6, 2025
13 tasks
Comment on lines -26 to -33
queueMicrotask(() => listener());
queueMicrotask(() => listener({ target: signal }));
} else {
signal[abortSignal.add](() => {
const handler = () => {
removeEventListener?.();
listener();
});
listener({ target: signal });
};
signal[abortSignal.add](handler);
removeEventListener = () => {
signal[abortSignal.remove](listener);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oof good catch!

Copy link
Contributor

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kt3k kt3k merged commit a2faf23 into denoland:main Jun 6, 2025
18 checks passed
@kt3k kt3k deleted the fix-ext-node-abort-listener branch June 6, 2025 12:33
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.

3 participants