Skip to content

Commit

Permalink
cluster: destruct primordials in lib/internal/cluster/worker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
peze committed Nov 4, 2019
1 parent 3a076ba commit b331d0f
Showing 1 changed file with 7 additions and 3 deletions.
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

0 comments on commit b331d0f

Please sign in to comment.