summaryrefslogtreecommitdiff
path: root/src/node_internals.h
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-11-13 15:54:57 +0000
committerAnna Henningsen <anna@addaleax.net>2020-03-21 10:57:23 +0100
commitc44edec4daff9f478eb9b5820d03da6c71253787 (patch)
treede93264d6d4a643f478329e67043ecc7f5f8edfc /src/node_internals.h
parenta9fb51f9be570001accfce8a057e885827655a2f (diff)
downloadnode-new-c44edec4daff9f478eb9b5820d03da6c71253787.tar.gz
src: provide a variant of LoadEnvironment taking a callback
This allows embedders to flexibly control how they start JS code rather than using `third_party_main`. PR-URL: https://github.com/nodejs/node/pull/30467 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r--src/node_internals.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index 6c9da144aa..dfb2c6e0c3 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -298,9 +298,10 @@ void DefineZlibConstants(v8::Local<v8::Object> target);
v8::Isolate* NewIsolate(v8::Isolate::CreateParams* params,
uv_loop_t* event_loop,
MultiIsolatePlatform* platform);
-v8::MaybeLocal<v8::Value> StartExecution(Environment* env);
+// This overload automatically picks the right 'main_script_id' if no callback
+// was provided by the embedder.
v8::MaybeLocal<v8::Value> StartExecution(Environment* env,
- const char* main_script_id);
+ StartExecutionCallback cb = nullptr);
v8::MaybeLocal<v8::Object> GetPerContextExports(v8::Local<v8::Context> context);
v8::MaybeLocal<v8::Value> ExecuteBootstrapper(
Environment* env,