diff --git a/lib/internal/cluster/worker.js b/lib/internal/cluster/worker.js index 9d9c5dce839035..4563b2e663b686 100644 --- a/lib/internal/cluster/worker.js +++ b/lib/internal/cluster/worker.js @@ -1,6 +1,10 @@ 'use strict'; -const { Object } = primordials; +const { + Object: { + setPrototypeOf: ObjectSetPrototypeOf + } +} = primordials; const EventEmitter = require('events'); @@ -32,8 +36,8 @@ function Worker(options) { } } -Object.setPrototypeOf(Worker.prototype, EventEmitter.prototype); -Object.setPrototypeOf(Worker, EventEmitter); +ObjectSetPrototypeOf(Worker.prototype, EventEmitter.prototype); +ObjectSetPrototypeOf(Worker, EventEmitter); Worker.prototype.kill = function() { this.destroy.apply(this, arguments);