mirror of
https://github.com/nodejs/node.git
synced 2026-11-15 10:36:53 -05:00
src: add LoadEnvironment() variant taking a string
Allow passing a string as the main module rather than using the callback variant. 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>
This commit is contained in:
10 files changed
+94
-2
No files matched your search
@@ -453,6 +453,10 @@ NODE_EXTERN v8::MaybeLocal<v8::Value> LoadEnvironment(
|
||||
Environment* env,
|
||||
StartExecutionCallback cb,
|
||||
std::unique_ptr<InspectorParentHandle> inspector_parent_handle = {});
|
||||
NODE_EXTERN v8::MaybeLocal<v8::Value> LoadEnvironment(
|
||||
Environment* env,
|
||||
const char* main_script_source_utf8,
|
||||
std::unique_ptr<InspectorParentHandle> inspector_parent_handle = {});
|
||||
NODE_EXTERN void FreeEnvironment(Environment* env);
|
||||
|
||||
// This may return nullptr if context is not associated with a Node instance.
|
||||
|
||||
Reference in new issue
Block a user