Skip to content

Commit b331d0f

Browse files
committedNov 4, 2019
cluster: destruct primordials in lib/internal/cluster/worker.js
Refs: nodejs/code-and-learn#97
1 parent 3a076ba commit b331d0f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed
 

‎lib/internal/cluster/worker.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
'use strict';
22

3-
const { Object } = primordials;
3+
const {
4+
Object: {
5+
setPrototypeOf: ObjectSetPrototypeOf
6+
}
7+
} = primordials;
48

59
const EventEmitter = require('events');
610

@@ -32,8 +36,8 @@ function Worker(options) {
3236
}
3337
}
3438

35-
Object.setPrototypeOf(Worker.prototype, EventEmitter.prototype);
36-
Object.setPrototypeOf(Worker, EventEmitter);
39+
ObjectSetPrototypeOf(Worker.prototype, EventEmitter.prototype);
40+
ObjectSetPrototypeOf(Worker, EventEmitter);
3741

3842
Worker.prototype.kill = function() {
3943
this.destroy.apply(this, arguments);

0 commit comments

Comments
 (0)