Skip to content

Commit 5c72cc3

Browse files
pezetargos
authored andcommitted
cluster: destruct primordials in lib/internal/cluster/worker.js
Refs: nodejs/code-and-learn#97 PR-URL: #30246 Refs: nodejs/code-and-learn#97 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 0e105bd commit 5c72cc3

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)