summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJackson Tian <shyvo1987@gmail.com>2016-02-04 10:53:17 +0800
committerJames M Snell <jasnell@gmail.com>2016-02-07 12:27:09 -0800
commit9aebb002b0855b502541909373064af59cb9341f (patch)
treeebc9a7a645941bc637a20cf36be50bfe1de26fee /src
parent07424705a69ef3d1267fe81da73db317e541ec96 (diff)
downloadnode-new-9aebb002b0855b502541909373064af59cb9341f.tar.gz
src: clean up usage of __proto__
Prefer using Object.setPrototypeOf() instead. PR-URL: https://github.com/nodejs/node/pull/5069 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/node.js b/src/node.js
index 2856943e4a..cdb147d4f9 100644
--- a/src/node.js
+++ b/src/node.js
@@ -13,11 +13,12 @@
function startup() {
var EventEmitter = NativeModule.require('events');
- process.__proto__ = Object.create(EventEmitter.prototype, {
+ Object.setPrototypeOf(process, Object.create(EventEmitter.prototype, {
constructor: {
value: process.constructor
}
- });
+ }));
+
EventEmitter.call(process);
let eeWarned = false;