events: fix bug listenerCount don't compare wrapped listener#48592
Merged
nodejs-github-bot merged 2 commits intonodejs:mainfrom Jul 10, 2023
Merged
events: fix bug listenerCount don't compare wrapped listener#48592nodejs-github-bot merged 2 commits intonodejs:mainfrom
nodejs-github-bot merged 2 commits intonodejs:mainfrom
Conversation
When add listener by once, it will be wrapped into another function. And when pass listener and there is just one event listener added by once, it will return 0 even if passed listener equal wrapped event listener. Refs: nodejs#46523
lpinca
approved these changes
Jun 29, 2023
Collaborator
ShogunPanda
approved these changes
Jun 29, 2023
Contributor
Author
Collaborator
Contributor
|
Nothing: those changes were unrelated to your PR. I resumed the build to let them succeed. |
This was referenced Jun 30, 2023
JungMinu
approved these changes
Jul 3, 2023
This was referenced Jul 4, 2023
Contributor
Author
|
What do I need to do more for this pr? Or just waiting for merge? |
Collaborator
|
Landed in 0c8539e |
anonrig
pushed a commit
to anonrig/node
that referenced
this pull request
Jul 11, 2023
When add listener by once, it will be wrapped into another function. And when pass listener and there is just one event listener added by once, it will return 0 even if passed listener equal wrapped event listener. Refs: nodejs#46523 PR-URL: nodejs#48592 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
juanarbol
pushed a commit
that referenced
this pull request
Jul 13, 2023
When add listener by once, it will be wrapped into another function. And when pass listener and there is just one event listener added by once, it will return 0 even if passed listener equal wrapped event listener. Refs: #46523 PR-URL: #48592 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Merged
Ceres6
pushed a commit
to Ceres6/node
that referenced
this pull request
Aug 14, 2023
When add listener by once, it will be wrapped into another function. And when pass listener and there is just one event listener added by once, it will return 0 even if passed listener equal wrapped event listener. Refs: nodejs#46523 PR-URL: nodejs#48592 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Ceres6
pushed a commit
to Ceres6/node
that referenced
this pull request
Aug 14, 2023
When add listener by once, it will be wrapped into another function. And when pass listener and there is just one event listener added by once, it will return 0 even if passed listener equal wrapped event listener. Refs: nodejs#46523 PR-URL: nodejs#48592 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
ruyadorno
pushed a commit
that referenced
this pull request
Sep 11, 2023
When add listener by once, it will be wrapped into another function. And when pass listener and there is just one event listener added by once, it will return 0 even if passed listener equal wrapped event listener. Refs: #46523 PR-URL: #48592 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Merged
ruyadorno
pushed a commit
that referenced
this pull request
Sep 13, 2023
When add listener by once, it will be wrapped into another function. And when pass listener and there is just one event listener added by once, it will return 0 even if passed listener equal wrapped event listener. Refs: #46523 PR-URL: #48592 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
ruyadorno
pushed a commit
that referenced
this pull request
Sep 17, 2023
When add listener by once, it will be wrapped into another function. And when pass listener and there is just one event listener added by once, it will return 0 even if passed listener equal wrapped event listener. Refs: #46523 PR-URL: #48592 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Minwoo Jung <nodecorelab@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
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.

description
When add listener by once, it will be wrapped into another function. And when pass listener and there is just one event listener added by once, it will return 0 even if passed listener equal wrapped event listener.
This bug is included in #46523
Refs: #46523
how to trigger this
And it will output like this: