Skip to content

Commit

Permalink
src: clean up usage of __proto__
Browse files Browse the repository at this point in the history
Prefer using Object.setPrototypeOf() instead.

PR-URL: #5069
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
JacksonTian authored and jasnell committed Feb 7, 2016
1 parent 0742470 commit 9aebb00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9aebb00

Please sign in to comment.