mirror of https://github.com/nodejs/node.git
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>pull/5069/merge
parent
07424705a6
commit
9aebb002b0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue