summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvan Lucas <evanlucas@me.com>2016-02-12 15:14:42 -0600
committerEvan Lucas <evanlucas@me.com>2016-02-15 09:33:17 -0600
commit31ebda24d4c1110586919444c4b4623deecde8eb (patch)
tree2e4becf5b0c5261aee230333ba29587360a693b9 /src
parent76b169c88b70fc27689690870e2938c120bfcb83 (diff)
downloadnode-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.js1
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: {