Skip to content
Closed
Show file tree
Hide file tree
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
6 changes: 1 addition & 5 deletions lib/internal/bootstrap/primordials.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

/* global breakAtBootstrap, primordials */
/* global primordials */

// This file subclasses and stores the JS builtins that come from the VM
// so that Node.js's builtin modules do not need to later look these up from
Expand All @@ -12,10 +12,6 @@
// `primordials.Object` where `primordials` is a lexical variable passed
// by the native module compiler.

if (breakAtBootstrap) {
debugger; // eslint-disable-line no-debugger
}

function copyProps(src, dest) {
for (const key of Reflect.ownKeys(src)) {
if (!Reflect.getOwnPropertyDescriptor(dest, key)) {
Expand Down
10 changes: 7 additions & 3 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,18 @@ MaybeLocal<Value> RunBootstrapping(Environment* env) {
// Store primordials
env->set_primordials(Object::New(isolate));
std::vector<Local<String>> primordials_params = {
FIXED_ONE_BYTE_STRING(isolate, "breakAtBootstrap"),
env->primordials_string()
};
std::vector<Local<Value>> primordials_args = {
Boolean::New(isolate,
env->options()->debug_options().break_node_first_line),
env->primordials()
};

#if HAVE_INSPECTOR
if (env->options()->debug_options().break_node_first_line) {
env->inspector_agent()->PauseOnNextJavascriptStatement(
"Break at bootstrap");
}
#endif // HAVE_INSPECTOR
MaybeLocal<Value> primordials_ret =
ExecuteBootstrapper(env,
"internal/bootstrap/primordials",
Expand Down