bootstrap: refactor to use more primordials · nodejs/node@292915a · GitHub
Skip to content

Commit 292915a

Browse files
aduh95danielleadams
authored andcommitted
bootstrap: refactor to use more primordials
PR-URL: #35999 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe>
1 parent f73b8d8 commit 292915a

3 files changed

Lines changed: 20 additions & 12 deletions

File tree

lib/internal/bootstrap/loaders.js

Lines changed: 12 additions & 7 deletions

lib/internal/bootstrap/node.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
setupPrepareStackTrace();
4040

4141
const {
42+
FunctionPrototypeCall,
4243
JSONParse,
4344
ObjectDefineProperty,
4445
ObjectGetPrototypeOf,
@@ -299,7 +300,7 @@ function setupProcessObject() {
299300
const EventEmitter = require('events');
300301
const origProcProto = ObjectGetPrototypeOf(process);
301302
ObjectSetPrototypeOf(origProcProto, EventEmitter.prototype);
302-
EventEmitter.call(process);
303+
FunctionPrototypeCall(EventEmitter, process);
303304
ObjectDefineProperty(process, SymbolToStringTag, {
304305
enumerable: false,
305306
writable: true,

lib/internal/bootstrap/pre_execution.js

Lines changed: 6 additions & 4 deletions

0 commit comments

Comments
 (0)