diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js index cf517cdcf2b5ef..a576eeb5e579f6 100644 --- a/lib/internal/bootstrap_node.js +++ b/lib/internal/bootstrap_node.js @@ -14,9 +14,7 @@ process._eventsCount = 0; const origProcProto = Object.getPrototypeOf(process); - Object.setPrototypeOf(process, Object.create(EventEmitter.prototype, { - constructor: Object.getOwnPropertyDescriptor(origProcProto, 'constructor') - })); + Object.setPrototypeOf(origProcProto, EventEmitter.prototype); EventEmitter.call(process); diff --git a/test/parallel/test-process-prototype.js b/test/parallel/test-process-prototype.js index 0a0de8123d127d..6eb442fd96e4d6 100644 --- a/test/parallel/test-process-prototype.js +++ b/test/parallel/test-process-prototype.js @@ -5,6 +5,7 @@ const EventEmitter = require('events'); const proto = Object.getPrototypeOf(process); +assert(process instanceof process.constructor); assert(proto instanceof EventEmitter); const desc = Object.getOwnPropertyDescriptor(proto, 'constructor');