events,lib: don't require EE#listenerCount() - #2661
Conversation
|
LGTM |
There was a problem hiding this comment.
req.listenerCount should be fine, unless userland code is punching the _httpMessage property.
|
Hm, re-reading the events that led up to this PR, it seems like deprecating |
|
@chrisdickinson How so? This is only to keep things from breaking while we message a move to |
|
Over all this is fine. The only real question I would have is what, if any impact this would have a event listeners that have implemented their own listenerCount. Would anything break? Given the intent and general use, I'd be very surprised if anything would. |
I guess? Hmm, we could check if |
129693c to
dc12f42
Compare
|
Updated @chrisdickinson / @jasnell / @cjihrig PTAL |
|
LGTM if the CI is happy |
|
Failed linting. Tests still in progress. https://ci.nodejs.org/job/node-linter/474/nodes=linter/console |
|
LGTM so long as everything passes! |
|
Ok, given that the CI is still having issues, this will need to land manually. Locally tests on my end show this passing all tests so LGTM. @Fishrock123, want to go ahead and get this landed the manual way? |
dc12f42 to
f21fd3b
Compare
|
Updated to fix the linter. CI to land: https://ci.nodejs.org/job/node-accept-pull-request/123/ |
|
The CI run looks green, but it's probably doomed if others have pushed to the same branch manually in the meantime. |
@orangemocha ... ok seriously what is going on here? This is expected output.... |
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: nodejs#2655 Refs: 8f58fb9 PR-URL: nodejs#2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
f21fd3b to
b513a33
Compare
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: #2655 Refs: 8f58fb9 PR-URL: #2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: nodejs#2655 Refs: 8f58fb9 PR-URL: nodejs#2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: #2655 Refs: 8f58fb9 PR-URL: #2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: #2655 Refs: 8f58fb9 PR-URL: #2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: #2655 Refs: 8f58fb9 PR-URL: #2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: #2655 Refs: 8f58fb9 PR-URL: #2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This makes it so certain public APIs of ours no longer require EventEmitters to have a
listenerCount()on their prototype.Fixes: #2655
See: 8f58fb9
I don't have the time to write other tests right now and i'm not sure they are necessary.