FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

events: fix adding `abort` listener in `events.once()` by daeyeon · Pull Request #43373 · nodejs/node · GitHub

/ node Public

events: fix adding abort listener in events.once() - #43373

Merged
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
daeyeon:master.events.once-220611.Sat.417b
Jun 14, 2022
Merged

events: fix adding abort listener in events.once()#43373
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
daeyeon:master.events.once-220611.Sat.417b

Conversation

daeyeon commented Jun 11, 2022
edited
Loading

Copy link
Copy Markdown
Member

Event listeners passed to un/subscribe the abort event are mismatched.
This removes the wrapper function in eventTargetAgnosticAddListener()
and directly passes the given listener to the EventTarget.

IMO, removing the wrapper seems harmless, and the AbortSignal is
seemingly the only EventTarget passed to the function as of now.

Fixes: #43337
Refs: #33659
Refs: #34997

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

Event listeners passed to un/subscribe the abort event are mismatched.
This removes the wrapper function in `eventTargetAgnosticAddListener()`
and directly passes the given listener to the `EventTarget`.

IMO, removing the wrapper seems harmless, and the `AbortSignal` is
seemingly the only `EventTarget` passed to this function for now.

Fixes: nodejs#43337
Refs: nodejs#33659
Refs: nodejs#34997

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
nodejs-github-bot added events Issues and PRs related to the events subsystem / EventEmitter. needs-ci PRs that need a full CI run. labels Jun 11, 2022
lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 11, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 11, 2022

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 14, 2022
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 14, 2022
nodejs-github-bot merged commit f7d73d4 into nodejs:master Jun 14, 2022

Copy link
Copy Markdown
Collaborator

Landed in f7d73d4

daeyeon deleted the master.events.once-220611.Sat.417b branch June 14, 2022 22:39
danielleadams pushed a commit that referenced this pull request Jun 16, 2022
Event listeners passed to un/subscribe the abort event are mismatched.
This removes the wrapper function in `eventTargetAgnosticAddListener()`
and directly passes the given listener to the `EventTarget`.

IMO, removing the wrapper seems harmless, and the `AbortSignal` is
seemingly the only `EventTarget` passed to this function for now.

Fixes: #43337
Refs: #33659
Refs: #34997

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

PR-URL: #43373
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
danielleadams mentioned this pull request Jun 16, 2022
targos pushed a commit that referenced this pull request Jul 12, 2022
Event listeners passed to un/subscribe the abort event are mismatched.
This removes the wrapper function in `eventTargetAgnosticAddListener()`
and directly passes the given listener to the `EventTarget`.

IMO, removing the wrapper seems harmless, and the `AbortSignal` is
seemingly the only `EventTarget` passed to this function for now.

Fixes: #43337
Refs: #33659
Refs: #34997

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

PR-URL: #43373
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos pushed a commit that referenced this pull request Jul 31, 2022
Event listeners passed to un/subscribe the abort event are mismatched.
This removes the wrapper function in `eventTargetAgnosticAddListener()`
and directly passes the given listener to the `EventTarget`.

IMO, removing the wrapper seems harmless, and the `AbortSignal` is
seemingly the only `EventTarget` passed to this function for now.

Fixes: #43337
Refs: #33659
Refs: #34997

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

PR-URL: #43373
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
Event listeners passed to un/subscribe the abort event are mismatched.
This removes the wrapper function in `eventTargetAgnosticAddListener()`
and directly passes the given listener to the `EventTarget`.

IMO, removing the wrapper seems harmless, and the `AbortSignal` is
seemingly the only `EventTarget` passed to this function for now.

Fixes: nodejs/node#43337
Refs: nodejs/node#33659
Refs: nodejs/node#34997

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

PR-URL: nodejs/node#43373
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

events Issues and PRs related to the events subsystem / EventEmitter. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

events.once leaks signal listener

5 participants


Back | FazBrowse Home | New Git URL