Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2021-03-25 20:36:30 +0300
committerJames M Snell <jasnell@gmail.com>2021-04-02 16:16:38 +0300
commitfb9257f6597f0581592826d236cfc7196afebaca (patch)
treed57e7bf9f449469947ec1fe8d755c83d0e63bac7 /src/env.h
parent1bead013b985208851a131feac3718ea6a1cadb2 (diff)
net: make net.BlockList cloneable
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/37917 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/env.h b/src/env.h
index f28ad400206..78dbdfaa05d 100644
--- a/src/env.h
+++ b/src/env.h
@@ -452,7 +452,7 @@ constexpr size_t kFsStatsBufferLength =
V(base_object_ctor_template, v8::FunctionTemplate) \
V(binding_data_ctor_template, v8::FunctionTemplate) \
V(blob_constructor_template, v8::FunctionTemplate) \
- V(blocklist_instance_template, v8::ObjectTemplate) \
+ V(blocklist_constructor_template, v8::FunctionTemplate) \
V(compiled_fn_entry_template, v8::ObjectTemplate) \
V(dir_instance_template, v8::ObjectTemplate) \
V(fd_constructor_template, v8::ObjectTemplate) \
@@ -1237,13 +1237,22 @@ class Environment : public MemoryRetainer {
const char* name,
v8::FunctionCallback callback);
+ enum class SetConstructorFunctionFlag {
+ NONE,
+ SET_CLASS_NAME,
+ };
+
inline void SetConstructorFunction(v8::Local<v8::Object> that,
const char* name,
- v8::Local<v8::FunctionTemplate> tmpl);
+ v8::Local<v8::FunctionTemplate> tmpl,
+ SetConstructorFunctionFlag flag =
+ SetConstructorFunctionFlag::SET_CLASS_NAME);
inline void SetConstructorFunction(v8::Local<v8::Object> that,
v8::Local<v8::String> name,
- v8::Local<v8::FunctionTemplate> tmpl);
+ v8::Local<v8::FunctionTemplate> tmpl,
+ SetConstructorFunctionFlag flag =
+ SetConstructorFunctionFlag::SET_CLASS_NAME);
void AtExit(void (*cb)(void* arg), void* arg);
void RunAtExitCallbacks();