diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-11-19 17:42:09 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-03-21 12:57:26 +0300 |
commit | 7dead8440c7ee28131cf496daa7c286eecfd90c7 (patch) | |
tree | 758c1cc77e25be86847fc136442c07a3e506e768 /src/node_native_module_env.h | |
parent | c44edec4daff9f478eb9b5820d03da6c71253787 (diff) |
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>
Diffstat (limited to 'src/node_native_module_env.h')
-rw-r--r-- | src/node_native_module_env.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node_native_module_env.h b/src/node_native_module_env.h index f662c67be50..bc36be75109 100644 --- a/src/node_native_module_env.h +++ b/src/node_native_module_env.h @@ -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 |