From 6dc0dae830c7a860531a3b4d30da628074068e3f Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Sun, 12 Jun 2016 13:14:34 +0200 Subject: [PATCH] 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 Reviewed-By: Brian White --- src/node.cc | 10 +++++----- test/message/core_line_numbers.out | 2 +- test/message/error_exit.out | 6 +++--- test/message/eval_messages.out | 8 ++++---- test/message/nexttick_throw.out | 6 +++--- test/message/stdin_messages.out | 8 ++++---- test/message/vm_display_runtime_error.out | 2 +- test/message/vm_display_syntax_error.out | 8 ++++---- test/message/vm_dont_display_runtime_error.out | 2 +- test/message/vm_dont_display_syntax_error.out | 4 ++-- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/node.cc b/src/node.cc index e7d61c05b275e2..107a1eb90fc4b8 100644 --- a/src/node.cc +++ b/src/node.cc @@ -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); @@ -3336,7 +3332,11 @@ void LoadEnvironment(Environment* env) { // are not safe to ignore. try_catch.SetVerbose(false); - Local 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 script_name = FIXED_ONE_BYTE_STRING(env->isolate(), + "bootstrap_node.js"); Local f_value = ExecuteString(env, MainSource(env), script_name); if (try_catch.HasCaught()) { ReportException(env, try_catch); diff --git a/test/message/core_line_numbers.out b/test/message/core_line_numbers.out index 4cd0c0bc857992..b8394e5c3f2deb 100644 --- a/test/message/core_line_numbers.out +++ b/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:*:*) diff --git a/test/message/error_exit.out b/test/message/error_exit.out index bae71be7795b25..e25af05861b5ce 100644 --- a/test/message/error_exit.out +++ b/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:*:* diff --git a/test/message/eval_messages.out b/test/message/eval_messages.out index 62f330725606b2..f1b9273342dbc2 100644 --- a/test/message/eval_messages.out +++ b/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. ([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. ([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. ([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. ([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 diff --git a/test/message/nexttick_throw.out b/test/message/nexttick_throw.out index bfbd69900b0cbf..9f32dcb6367ffd 100644 --- a/test/message/nexttick_throw.out +++ b/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:*:* diff --git a/test/message/stdin_messages.out b/test/message/stdin_messages.out index a7c45a1fbb33fb..1d860918df2fcd 100644 --- a/test/message/stdin_messages.out +++ b/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. ([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. ([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. ([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. ([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:*:*) diff --git a/test/message/vm_display_runtime_error.out b/test/message/vm_display_runtime_error.out index c4c9d795587489..9c14783472b000 100644 --- a/test/message/vm_display_runtime_error.out +++ b/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:*) diff --git a/test/message/vm_display_syntax_error.out b/test/message/vm_display_syntax_error.out index a8ee8eea33bac3..8917f2f9d0cbb7 100644 --- a/test/message/vm_display_syntax_error.out +++ b/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:*) diff --git a/test/message/vm_dont_display_runtime_error.out b/test/message/vm_dont_display_runtime_error.out index 189447968775c6..6cc464505f35ba 100644 --- a/test/message/vm_dont_display_runtime_error.out +++ b/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:*) diff --git a/test/message/vm_dont_display_syntax_error.out b/test/message/vm_dont_display_syntax_error.out index e84710a88a02b2..de3daab301890e 100644 --- a/test/message/vm_dont_display_syntax_error.out +++ b/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:*)