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:
Anna Henningsen committed 2020-03-21 10:57:26 +01:00
1 parent c44edec4da
commit 7dead8440c
10 files changed
+94 -2

No files matched your search

+1
View File
@@ -29,6 +29,7 @@ class NativeModuleEnv {
// Returns config.gypi as a JSON string
static v8::Local<v8::String> GetConfigString(v8::Isolate* isolate);
static bool Exists(const char* id);
static bool Add(const char* id, const UnionBytes& source);
// Loads data into NativeModuleLoader::.instance.code_cache_
// Generated by mkcodecache as node_code_cache.cc when