Skip to content

Commit 6dc0dae

Browse files
danbevevanlucas
authored andcommitted
src: rename "node" script to "bootstrap_node"
This commit updates the node.js script name to reflect its actual name, which is now bootstrap_node.js. This commit also fixes the requisite message tests, and relocates a comment which seems to have drifted. PR-URL: #7277 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Brian White <[email protected]>
1 parent 1a0ed26 commit 6dc0dae

10 files changed

+28
-28
lines changed

src/node.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3322,10 +3322,6 @@ void LoadEnvironment(Environment* env) {
33223322
env->isolate()->SetFatalErrorHandler(node::OnFatalError);
33233323
env->isolate()->AddMessageListener(OnMessage);
33243324

3325-
// Compile, execute the src/node.js file. (Which was included as static C
3326-
// string in node_natives.h. 'native_node' is the string containing that
3327-
// source code.)
3328-
33293325
// The node.js file returns a function 'f'
33303326
atexit(AtExit);
33313327

@@ -3336,7 +3332,11 @@ void LoadEnvironment(Environment* env) {
33363332
// are not safe to ignore.
33373333
try_catch.SetVerbose(false);
33383334

3339-
Local<String> script_name = FIXED_ONE_BYTE_STRING(env->isolate(), "node.js");
3335+
// Execute the lib/internal/bootstrap_node.js file which was included as a
3336+
// static C string in node_natives.h by node_js2c.
3337+
// 'internal_bootstrap_node_native' is the string containing that source code.
3338+
Local<String> script_name = FIXED_ONE_BYTE_STRING(env->isolate(),
3339+
"bootstrap_node.js");
33403340
Local<Value> f_value = ExecuteString(env, MainSource(env), script_name);
33413341
if (try_catch.HasCaught()) {
33423342
ReportException(env, try_catch);

test/message/core_line_numbers.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ RangeError: Invalid input
1212
at tryModuleLoad (module.js:*:*)
1313
at Function.Module._load (module.js:*:*)
1414
at Module.runMain (module.js:*:*)
15-
at run (node.js:*:*)
15+
at run (bootstrap_node.js:*:*)

test/message/error_exit.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ AssertionError: 1 == 2
1111
at tryModuleLoad (module.js:*:*)
1212
at Function.Module._load (module.js:*:*)
1313
at Module.runMain (module.js:*:*)
14-
at run (node.js:*:*)
15-
at startup (node.js:*:*)
16-
at node.js:*:*
14+
at run (bootstrap_node.js:*:*)
15+
at startup (bootstrap_node.js:*:*)
16+
at bootstrap_node.js:*:*

test/message/eval_messages.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SyntaxError: Strict mode code may not include a with statement
66
at Object.exports.runInThisContext (vm.js:*)
77
at Object.<anonymous> ([eval]-wrapper:*:*)
88
at Module._compile (module.js:*:*)
9-
at node.js:*:*
9+
at bootstrap_node.js:*:*
1010
at _combinedTickCallback (internal/process/next_tick.js:*:*)
1111
at process._tickCallback (internal/process/next_tick.js:*:*)
1212
42
@@ -19,7 +19,7 @@ Error: hello
1919
at Object.exports.runInThisContext (vm.js:*)
2020
at Object.<anonymous> ([eval]-wrapper:*:*)
2121
at Module._compile (module.js:*:*)
22-
at node.js:*:*
22+
at bootstrap_node.js:*:*
2323
at _combinedTickCallback (internal/process/next_tick.js:*:*)
2424
at process._tickCallback (internal/process/next_tick.js:*:*)
2525
[eval]:1
@@ -30,7 +30,7 @@ Error: hello
3030
at Object.exports.runInThisContext (vm.js:*)
3131
at Object.<anonymous> ([eval]-wrapper:*:*)
3232
at Module._compile (module.js:*:*)
33-
at node.js:*:*
33+
at bootstrap_node.js:*:*
3434
at _combinedTickCallback (internal/process/next_tick.js:*:*)
3535
at process._tickCallback (internal/process/next_tick.js:*:*)
3636
100
@@ -42,7 +42,7 @@ ReferenceError: y is not defined
4242
at Object.exports.runInThisContext (vm.js:*)
4343
at Object.<anonymous> ([eval]-wrapper:*:*)
4444
at Module._compile (module.js:*:*)
45-
at node.js:*:*
45+
at bootstrap_node.js:*:*
4646
at _combinedTickCallback (internal/process/next_tick.js:*:*)
4747
at process._tickCallback (internal/process/next_tick.js:*:*)
4848
[eval]:1

test/message/nexttick_throw.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ ReferenceError: undefined_reference_error_maker is not defined
77
at _combinedTickCallback (internal/process/next_tick.js:*:*)
88
at process._tickCallback (internal/process/next_tick.js:*:*)
99
at Module.runMain (module.js:*:*)
10-
at run (node.js:*:*)
11-
at startup (node.js:*:*)
12-
at node.js:*:*
10+
at run (bootstrap_node.js:*:*)
11+
at startup (bootstrap_node.js:*:*)
12+
at bootstrap_node.js:*:*

test/message/stdin_messages.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SyntaxError: Strict mode code may not include a with statement
77
at Object.exports.runInThisContext (vm.js:*)
88
at Object.<anonymous> ([stdin]-wrapper:*:*)
99
at Module._compile (module.js:*:*)
10-
at node.js:*:*
10+
at bootstrap_node.js:*:*
1111
at _combinedTickCallback (internal/process/next_tick.js:*:*)
1212
at process._tickCallback (internal/process/next_tick.js:*:*)
1313
42
@@ -21,7 +21,7 @@ Error: hello
2121
at Object.exports.runInThisContext (vm.js:*)
2222
at Object.<anonymous> ([stdin]-wrapper:*:*)
2323
at Module._compile (module.js:*:*)
24-
at node.js:*:*
24+
at bootstrap_node.js:*:*
2525
at _combinedTickCallback (internal/process/next_tick.js:*:*)
2626
at process._tickCallback (internal/process/next_tick.js:*:*)
2727

@@ -33,7 +33,7 @@ Error: hello
3333
at Object.exports.runInThisContext (vm.js:*)
3434
at Object.<anonymous> ([stdin]-wrapper:*:*)
3535
at Module._compile (module.js:*:*)
36-
at node.js:*:*
36+
at bootstrap_node.js:*:*
3737
at _combinedTickCallback (internal/process/next_tick.js:*:*)
3838
at process._tickCallback (internal/process/next_tick.js:*:*)
3939
100
@@ -46,7 +46,7 @@ ReferenceError: y is not defined
4646
at Object.exports.runInThisContext (vm.js:*)
4747
at Object.<anonymous> ([stdin]-wrapper:*:*)
4848
at Module._compile (module.js:*:*)
49-
at node.js:*:*
49+
at bootstrap_node.js:*:*
5050
at _combinedTickCallback (internal/process/next_tick.js:*:*)
5151
at process._tickCallback (internal/process/next_tick.js:*:*)
5252

test/message/vm_display_runtime_error.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ Error: boo!
1313
at tryModuleLoad (module.js:*:*)
1414
at Function.Module._load (module.js:*)
1515
at Module.runMain (module.js:*)
16-
at run (node.js:*)
16+
at run (bootstrap_node.js:*)

test/message/vm_display_syntax_error.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ SyntaxError: Unexpected number
1212
at tryModuleLoad (module.js:*:*)
1313
at Function.Module._load (module.js:*)
1414
at Module.runMain (module.js:*)
15-
at run (node.js:*)
16-
at startup (node.js:*)
15+
at run (bootstrap_node.js:*)
16+
at startup (bootstrap_node.js:*)
1717
test.vm:1
1818
var 5;
1919
^
@@ -26,5 +26,5 @@ SyntaxError: Unexpected number
2626
at tryModuleLoad (module.js:*:*)
2727
at Function.Module._load (module.js:*)
2828
at Module.runMain (module.js:*)
29-
at run (node.js:*)
30-
at startup (node.js:*)
29+
at run (bootstrap_node.js:*)
30+
at startup (bootstrap_node.js:*)

test/message/vm_dont_display_runtime_error.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ Error: boo!
1313
at tryModuleLoad (module.js:*:*)
1414
at Function.Module._load (module.js:*)
1515
at Module.runMain (module.js:*)
16-
at run (node.js:*)
16+
at run (bootstrap_node.js:*)

test/message/vm_dont_display_syntax_error.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ SyntaxError: Unexpected number
1212
at tryModuleLoad (module.js:*:*)
1313
at Function.Module._load (module.js:*)
1414
at Module.runMain (module.js:*)
15-
at run (node.js:*)
16-
at startup (node.js:*)
15+
at run (bootstrap_node.js:*)
16+
at startup (bootstrap_node.js:*)

0 commit comments

Comments
 (0)