events,lib: don't require EE#listenerCount()
authorJeremiah Senkpiel <fishrock123@rocketmail.com>
Wed, 2 Sep 2015 16:23:49 +0000 (12:23 -0400)
committerRod Vagg <rod@vagg.org>
Sun, 6 Sep 2015 11:39:00 +0000 (21:39 +1000)
commitf3696f64a15215b65a9ee95747f8e2a9d762bd5b
tree383f2e6a27ac8180f73b97d806f1dda32b4ae9a8
parent101db8011168046deb1de96a810edd4338ca88e5
events,lib: don't require EE#listenerCount()

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: https://github.com/nodejs/node/issues/2655
Refs: 8f58fb92fff904a6ca58fd0df9ee5a1816e5b84e

PR-URL: https://github.com/nodejs/node/pull/2661
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
lib/_http_server.js
lib/_stream_readable.js
lib/events.js
lib/stream.js
test/parallel/test-stream-pipe-without-listenerCount.js [new file with mode: 0644]