Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
cluster: destruct primordials in lib/internal/cluster/worker.js
  • Loading branch information
peze committed Nov 4, 2019
commit b331d0f7bdb99a57949fb16568f301c225925e1b
10 changes: 7 additions & 3 deletions lib/internal/cluster/worker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
'use strict';

const { Object } = primordials;
const {
Object: {
setPrototypeOf: ObjectSetPrototypeOf
}
} = primordials;

const EventEmitter = require('events');

Expand Down Expand Up @@ -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);
Expand Down