summaryrefslogtreecommitdiff
path: root/src/node_native_module.h
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-01-13 23:44:09 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2019-01-16 03:42:41 +0800
commit2c7f4f474bfbb19b7ae6597112cca41141bf71a4 (patch)
tree39e594fc5e4e4286802feaf4ee9a3357693a3bbd /src/node_native_module.h
parent27f6d04dcf092c23d00d19eacf13e5c751ea9c5f (diff)
downloadandroid-node-v8-2c7f4f474bfbb19b7ae6597112cca41141bf71a4.tar.gz
android-node-v8-2c7f4f474bfbb19b7ae6597112cca41141bf71a4.tar.bz2
android-node-v8-2c7f4f474bfbb19b7ae6597112cca41141bf71a4.zip
process: allow StartExecution() to take a main script ID
The idea is to allow the C++ layer to run arbitrary scripts as the main script. This paves the way for - cctest of the execution of Node.js instances - Earlier handling of per-process CLI options that affect execution modes (those usually do not make sense for the embedders). - Targets like mkcodecache or mksnapshot. Also moves the handling of `_third_party_main.js` into C++. PR-URL: https://github.com/nodejs/node/pull/25474 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Diffstat (limited to 'src/node_native_module.h')
-rw-r--r--src/node_native_module.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_native_module.h b/src/node_native_module.h
index 9a0afcc0b9..62c417a0b6 100644
--- a/src/node_native_module.h
+++ b/src/node_native_module.h
@@ -54,6 +54,8 @@ class NativeModuleLoader {
std::vector<v8::Local<v8::Value>>* arguments,
Environment* optional_env);
+ bool Exists(const char* id);
+
private:
static void GetCacheUsage(const v8::FunctionCallbackInfo<v8::Value>& args);
// Passing ids of builtin module source code into JS land as