diff options
Diffstat (limited to 'src/node_native_module.h')
-rw-r--r-- | src/node_native_module.h | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/node_native_module.h b/src/node_native_module.h index 62c417a0b6..be1fc92a76 100644 --- a/src/node_native_module.h +++ b/src/node_native_module.h @@ -42,20 +42,17 @@ class NativeModuleLoader { // Returns config.gypi as a JSON string v8::Local<v8::String> GetConfigString(v8::Isolate* isolate) const; - // Run a script with JS source bundled inside the binary as if it's wrapped - // in a function called with a null receiver and arguments specified in C++. - // The returned value is empty if an exception is encountered. - // JS code run with this method can assume that their top-level - // declarations won't affect the global scope. - v8::MaybeLocal<v8::Value> CompileAndCall( + bool Exists(const char* id); + + // For bootstrappers optional_env may be a nullptr. + // If an exception is encountered (e.g. source code contains + // syntax error), the returned value is empty. + v8::MaybeLocal<v8::Function> LookupAndCompile( v8::Local<v8::Context> context, const char* id, std::vector<v8::Local<v8::String>>* parameters, - 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 @@ -87,15 +84,6 @@ class NativeModuleLoader { static v8::MaybeLocal<v8::Function> CompileAsModule(Environment* env, const char* id); - // For bootstrappers optional_env may be a nullptr. - // If an exception is encountered (e.g. source code contains - // syntax error), the returned value is empty. - v8::MaybeLocal<v8::Function> LookupAndCompile( - v8::Local<v8::Context> context, - const char* id, - std::vector<v8::Local<v8::String>>* parameters, - Environment* optional_env); - NativeModuleRecordMap source_; NativeModuleCacheMap code_cache_; UnionBytes config_; |