Browse Source

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: https://github.com/nodejs/node/pull/7277
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
v7.x
Daniel Bevenius 9 years ago
committed by cjihrig
parent
commit
81b6882e51
  1. 10
      src/node.cc
  2. 2
      test/message/core_line_numbers.out
  3. 6
      test/message/error_exit.out
  4. 8
      test/message/eval_messages.out
  5. 6
      test/message/nexttick_throw.out
  6. 8
      test/message/stdin_messages.out
  7. 2
      test/message/vm_display_runtime_error.out
  8. 8
      test/message/vm_display_syntax_error.out
  9. 2
      test/message/vm_dont_display_runtime_error.out
  10. 4
      test/message/vm_dont_display_syntax_error.out

10
src/node.cc

@ -3271,10 +3271,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);
@ -3285,7 +3281,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);

2
test/message/core_line_numbers.out

@ -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
test/message/error_exit.out

@ -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
test/message/eval_messages.out

@ -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
@ -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
@ -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
@ -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

6
test/message/nexttick_throw.out

@ -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
test/message/stdin_messages.out

@ -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
@ -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:*:*)
@ -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
@ -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:*:*)

2
test/message/vm_display_runtime_error.out

@ -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
test/message/vm_display_syntax_error.out

@ -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;
^
@ -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
test/message/vm_dont_display_runtime_error.out

@ -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
test/message/vm_dont_display_syntax_error.out

@ -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:*)

Loading…
Cancel
Save