Skip to content

Commit

Permalink
src: rename "node" script to "bootstrap_node"
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
danbev authored and evanlucas committed Jun 27, 2016
1 parent 1a0ed26 commit 6dc0dae
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 28 deletions.
10 changes: 5 additions & 5 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3322,10 +3322,6 @@ void LoadEnvironment(Environment* env) {
env->isolate()->SetFatalErrorHandler(node::OnFatalError);
env->isolate()->AddMessageListener(OnMessage);

// Compile, execute the src/node.js file. (Which was included as static C
// string in node_natives.h. 'native_node' is the string containing that
// source code.)

// The node.js file returns a function 'f'
atexit(AtExit);

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

Local<String> script_name = FIXED_ONE_BYTE_STRING(env->isolate(), "node.js");
// Execute the lib/internal/bootstrap_node.js file which was included as a
// static C string in node_natives.h by node_js2c.
// 'internal_bootstrap_node_native' is the string containing that source code.
Local<String> script_name = FIXED_ONE_BYTE_STRING(env->isolate(),
"bootstrap_node.js");
Local<Value> f_value = ExecuteString(env, MainSource(env), script_name);
if (try_catch.HasCaught()) {
ReportException(env, try_catch);
Expand Down
2 changes: 1 addition & 1 deletion test/message/core_line_numbers.out
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ RangeError: Invalid input
at tryModuleLoad (module.js:*:*)
at Function.Module._load (module.js:*:*)
at Module.runMain (module.js:*:*)
at run (node.js:*:*)
at run (bootstrap_node.js:*:*)
6 changes: 3 additions & 3 deletions test/message/error_exit.out
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ AssertionError: 1 == 2
at tryModuleLoad (module.js:*:*)
at Function.Module._load (module.js:*:*)
at Module.runMain (module.js:*:*)
at run (node.js:*:*)
at startup (node.js:*:*)
at node.js:*:*
at run (bootstrap_node.js:*:*)
at startup (bootstrap_node.js:*:*)
at bootstrap_node.js:*:*
8 changes: 4 additions & 4 deletions test/message/eval_messages.out
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SyntaxError: Strict mode code may not include a with statement
at Object.exports.runInThisContext (vm.js:*)
at Object.<anonymous> ([eval]-wrapper:*:*)
at Module._compile (module.js:*:*)
at node.js:*:*
at bootstrap_node.js:*:*
at _combinedTickCallback (internal/process/next_tick.js:*:*)
at process._tickCallback (internal/process/next_tick.js:*:*)
42
Expand All @@ -19,7 +19,7 @@ Error: hello
at Object.exports.runInThisContext (vm.js:*)
at Object.<anonymous> ([eval]-wrapper:*:*)
at Module._compile (module.js:*:*)
at node.js:*:*
at bootstrap_node.js:*:*
at _combinedTickCallback (internal/process/next_tick.js:*:*)
at process._tickCallback (internal/process/next_tick.js:*:*)
[eval]:1
Expand All @@ -30,7 +30,7 @@ Error: hello
at Object.exports.runInThisContext (vm.js:*)
at Object.<anonymous> ([eval]-wrapper:*:*)
at Module._compile (module.js:*:*)
at node.js:*:*
at bootstrap_node.js:*:*
at _combinedTickCallback (internal/process/next_tick.js:*:*)
at process._tickCallback (internal/process/next_tick.js:*:*)
100
Expand All @@ -42,7 +42,7 @@ ReferenceError: y is not defined
at Object.exports.runInThisContext (vm.js:*)
at Object.<anonymous> ([eval]-wrapper:*:*)
at Module._compile (module.js:*:*)
at node.js:*:*
at bootstrap_node.js:*:*
at _combinedTickCallback (internal/process/next_tick.js:*:*)
at process._tickCallback (internal/process/next_tick.js:*:*)
[eval]:1
Expand Down
6 changes: 3 additions & 3 deletions test/message/nexttick_throw.out
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ ReferenceError: undefined_reference_error_maker is not defined
at _combinedTickCallback (internal/process/next_tick.js:*:*)
at process._tickCallback (internal/process/next_tick.js:*:*)
at Module.runMain (module.js:*:*)
at run (node.js:*:*)
at startup (node.js:*:*)
at node.js:*:*
at run (bootstrap_node.js:*:*)
at startup (bootstrap_node.js:*:*)
at bootstrap_node.js:*:*
8 changes: 4 additions & 4 deletions test/message/stdin_messages.out
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SyntaxError: Strict mode code may not include a with statement
at Object.exports.runInThisContext (vm.js:*)
at Object.<anonymous> ([stdin]-wrapper:*:*)
at Module._compile (module.js:*:*)
at node.js:*:*
at bootstrap_node.js:*:*
at _combinedTickCallback (internal/process/next_tick.js:*:*)
at process._tickCallback (internal/process/next_tick.js:*:*)
42
Expand All @@ -21,7 +21,7 @@ Error: hello
at Object.exports.runInThisContext (vm.js:*)
at Object.<anonymous> ([stdin]-wrapper:*:*)
at Module._compile (module.js:*:*)
at node.js:*:*
at bootstrap_node.js:*:*
at _combinedTickCallback (internal/process/next_tick.js:*:*)
at process._tickCallback (internal/process/next_tick.js:*:*)

Expand All @@ -33,7 +33,7 @@ Error: hello
at Object.exports.runInThisContext (vm.js:*)
at Object.<anonymous> ([stdin]-wrapper:*:*)
at Module._compile (module.js:*:*)
at node.js:*:*
at bootstrap_node.js:*:*
at _combinedTickCallback (internal/process/next_tick.js:*:*)
at process._tickCallback (internal/process/next_tick.js:*:*)
100
Expand All @@ -46,7 +46,7 @@ ReferenceError: y is not defined
at Object.exports.runInThisContext (vm.js:*)
at Object.<anonymous> ([stdin]-wrapper:*:*)
at Module._compile (module.js:*:*)
at node.js:*:*
at bootstrap_node.js:*:*
at _combinedTickCallback (internal/process/next_tick.js:*:*)
at process._tickCallback (internal/process/next_tick.js:*:*)

Expand Down
2 changes: 1 addition & 1 deletion test/message/vm_display_runtime_error.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Error: boo!
at tryModuleLoad (module.js:*:*)
at Function.Module._load (module.js:*)
at Module.runMain (module.js:*)
at run (node.js:*)
at run (bootstrap_node.js:*)
8 changes: 4 additions & 4 deletions test/message/vm_display_syntax_error.out
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ SyntaxError: Unexpected number
at tryModuleLoad (module.js:*:*)
at Function.Module._load (module.js:*)
at Module.runMain (module.js:*)
at run (node.js:*)
at startup (node.js:*)
at run (bootstrap_node.js:*)
at startup (bootstrap_node.js:*)
test.vm:1
var 5;
^
Expand All @@ -26,5 +26,5 @@ SyntaxError: Unexpected number
at tryModuleLoad (module.js:*:*)
at Function.Module._load (module.js:*)
at Module.runMain (module.js:*)
at run (node.js:*)
at startup (node.js:*)
at run (bootstrap_node.js:*)
at startup (bootstrap_node.js:*)
2 changes: 1 addition & 1 deletion test/message/vm_dont_display_runtime_error.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Error: boo!
at tryModuleLoad (module.js:*:*)
at Function.Module._load (module.js:*)
at Module.runMain (module.js:*)
at run (node.js:*)
at run (bootstrap_node.js:*)
4 changes: 2 additions & 2 deletions test/message/vm_dont_display_syntax_error.out
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ SyntaxError: Unexpected number
at tryModuleLoad (module.js:*:*)
at Function.Module._load (module.js:*)
at Module.runMain (module.js:*)
at run (node.js:*)
at startup (node.js:*)
at run (bootstrap_node.js:*)
at startup (bootstrap_node.js:*)

0 comments on commit 6dc0dae

Please sign in to comment.