From bd932a347e659bc02f83449662c78ff535fd5f09 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sun, 10 Feb 2019 17:10:17 +0800 Subject: [PATCH] lib: move per_context.js under lib/internal/bootstrap PR-URL: https://github.com/nodejs/node/pull/26033 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- lib/internal/bootstrap/cache.js | 3 +-- lib/internal/{per_context.js => bootstrap/context.js} | 0 node.gyp | 2 +- src/api/environment.cc | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) rename lib/internal/{per_context.js => bootstrap/context.js} (100%) diff --git a/lib/internal/bootstrap/cache.js b/lib/internal/bootstrap/cache.js index 9cfa30aef7ee6f..3dc6650cd3e35b 100644 --- a/lib/internal/bootstrap/cache.js +++ b/lib/internal/bootstrap/cache.js @@ -18,10 +18,9 @@ const cannotBeRequired = [ 'internal/v8_prof_polyfill', 'internal/v8_prof_processor', - 'internal/per_context', - 'internal/test/binding', + 'internal/bootstrap/context', 'internal/bootstrap/primordials', 'internal/bootstrap/loaders', 'internal/bootstrap/node' diff --git a/lib/internal/per_context.js b/lib/internal/bootstrap/context.js similarity index 100% rename from lib/internal/per_context.js rename to lib/internal/bootstrap/context.js diff --git a/node.gyp b/node.gyp index 29441019a48067..d29db8da3b89db 100644 --- a/node.gyp +++ b/node.gyp @@ -26,7 +26,7 @@ 'node_lib_target_name%': 'node_lib', 'node_intermediate_lib_type%': 'static_library', 'library_files': [ - 'lib/internal/per_context.js', + 'lib/internal/bootstrap/context.js', 'lib/internal/bootstrap/primordials.js', 'lib/internal/bootstrap/cache.js', 'lib/internal/bootstrap/loaders.js', diff --git a/src/api/environment.cc b/src/api/environment.cc index 2f4a35b975d1c1..a1320c0761d0b5 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -183,7 +183,7 @@ Local NewContext(Isolate* isolate, True(isolate)); { - // Run lib/internal/per_context.js + // Run lib/internal/bootstrap/context.js Context::Scope context_scope(context); std::vector> parameters = { @@ -191,7 +191,7 @@ Local NewContext(Isolate* isolate, Local arguments[] = {context->Global()}; MaybeLocal maybe_fn = per_process::native_module_loader.LookupAndCompile( - context, "internal/per_context", ¶meters, nullptr); + context, "internal/bootstrap/context", ¶meters, nullptr); if (maybe_fn.IsEmpty()) { return Local(); }