diff options
author | Evan Lucas <evanlucas@me.com> | 2016-02-12 15:14:42 -0600 |
---|---|---|
committer | Evan Lucas <evanlucas@me.com> | 2016-02-15 09:33:17 -0600 |
commit | 31ebda24d4c1110586919444c4b4623deecde8eb (patch) | |
tree | 2e4becf5b0c5261aee230333ba29587360a693b9 /src | |
parent | 76b169c88b70fc27689690870e2938c120bfcb83 (diff) | |
download | node-new-31ebda24d4c1110586919444c4b4623deecde8eb.tar.gz |
node: set process._eventsCount to 0 on startup
process is an EventEmitter. There are operations that increment and
decrement the _eventsCount property of an EventEmitter.
process._eventsCount would previously get set to NaN. This change makes
process._eventsCount be calculated as expected.
PR-URL: https://github.com/nodejs/node/pull/5208
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src')
-rw-r--r-- | src/node.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node.js b/src/node.js index ec0e6bf630..2912188cb1 100644 --- a/src/node.js +++ b/src/node.js @@ -12,6 +12,7 @@ function startup() { var EventEmitter = NativeModule.require('events'); + process._eventsCount = 0; Object.setPrototypeOf(process, Object.create(EventEmitter.prototype, { constructor: { |