events: simplify event target agnostic logic in on and once#34997
Closed
lundibundi wants to merge 1 commit intonodejs:masterfrom
Closed
events: simplify event target agnostic logic in on and once#34997lundibundi wants to merge 1 commit intonodejs:masterfrom
lundibundi wants to merge 1 commit intonodejs:masterfrom
Conversation
Collaborator
Collaborator
benjamingr
approved these changes
Sep 1, 2020
Member
benjamingr
left a comment
There was a problem hiding this comment.
I am confused regarding why the code was the way it was originally lol
ZYSzys
approved these changes
Sep 6, 2020
Contributor
Commit Queue failed- Loading data for nodejs/node/pull/34997 ✔ Done loading data for nodejs/node/pull/34997 ----------------------------------- PR info ------------------------------------ Title events: simplify event target agnostic logic in on and once (#34997) Author Denys Otrishko (@lundibundi) Branch lundibundi:improve-events-event-target -> nodejs:master Labels author ready, events Commits 1 - events: simplify event target agnostic logic in on and once Committers 1 - Denys Otrishko PR-URL: https://github.com/nodejs/node/pull/34997 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Yongsheng Zhang ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/34997 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Yongsheng Zhang -------------------------------------------------------------------------------- ✔ Last GitHub Actions successful ℹ Last Full PR CI on 2020-08-31T19:35:13Z: https://ci.nodejs.org/job/node-test-pull-request/32986/ - Querying data for job/node-test-pull-request/32986/ ✔ Build data downloaded ✔ Last Jenkins CI successful ℹ This PR was created on Mon, 31 Aug 2020 17:45:45 GMT ✔ Approvals: 2 ✔ - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/34997#pullrequestreview-479543094 ✔ - Yongsheng Zhang (@ZYSzys): https://github.com/nodejs/node/pull/34997#pullrequestreview-483128689 -------------------------------------------------------------------------------- ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/master up to date... From https://github.com/nodejs/node * branch master -> FETCH_HEAD ✔ origin/master is now up-to-date - Downloading patch for 34997 ✔ Downloaded patch to /home/runner/work/node/node/.ncu/34997/patch -------------------------------------------------------------------------------- error: patch failed: lib/events.js:793 error: lib/events.js: patch does not apply hint: Use 'git am --show-current-patch=diff' to see the failed patch Applying: events: simplify event target agnostic logic in on and once Patch failed at 0001 events: simplify event target agnostic logic in on and once When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". -------------------------------------------------------------------------------- Applying: events: simplify event target agnostic logic in on and once error: sha1 information is lacking or useless (lib/events.js). error: could not build fake ancestor hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 events: simplify event target agnostic logic in on and once When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". |
lundibundi
added a commit
that referenced
this pull request
Sep 11, 2020
PR-URL: #34997 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]>
Member
Author
|
Landed in b1831fe |
14 tasks
Member
|
this doesn't land cleanly on v14.x, should it be backported? |
Member
Author
|
@ruyadorno these changes were applied on top of other changes related to |
joesepi
pushed a commit
to joesepi/node
that referenced
this pull request
Jan 8, 2021
PR-URL: nodejs#34997 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]>
daeyeon
added a commit
to daeyeon/node
that referenced
this pull request
Jun 11, 2022
Event listeners pased 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 [email protected]
daeyeon
added a commit
to daeyeon/node
that referenced
this pull request
Jun 11, 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#43337 Refs: nodejs#33659 Refs: nodejs#34997 Signed-off-by: Daeyeon Jeong [email protected]
nodejs-github-bot
pushed a commit
that referenced
this pull request
Jun 14, 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 [email protected] PR-URL: #43373 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
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 [email protected] PR-URL: #43373 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
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 [email protected] PR-URL: #43373 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
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 [email protected] PR-URL: #43373 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
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 [email protected] PR-URL: nodejs/node#43373 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesThis simplifies logic related to EventTarget handling and shortens the code.
/cc @nodejs/events @jasnell