diff options
| author | legendecas <legendecas@gmail.com> | 2022-08-02 00:01:02 +0800 |
|---|---|---|
| committer | legendecas <legendecas@gmail.com> | 2022-08-02 00:01:02 +0800 |
| commit | a7e5b413efd5f98d4b9acf39ff5e87ddbd8c63ff (patch) | |
| tree | b3ae111dcfe5ab8db74df9d355aa009a9ea024c7 /src/env.h | |
| parent | 7f7a899fa5f3b192d4f503f6602f24f7ff4ec57a (diff) | |
| download | node-new-a7e5b413efd5f98d4b9acf39ff5e87ddbd8c63ff.tar.gz | |
src: split property helpers from node::Environment
PR-URL: https://github.com/nodejs/node/pull/44056
Refs: https://github.com/nodejs/node/issues/42528
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Diffstat (limited to 'src/env.h')
| -rw-r--r-- | src/env.h | 50 |
1 files changed, 0 insertions, 50 deletions
@@ -1292,56 +1292,6 @@ class Environment : public MemoryRetainer { const char* path = nullptr, const char* dest = nullptr); - v8::Local<v8::FunctionTemplate> NewFunctionTemplate( - v8::FunctionCallback callback, - v8::Local<v8::Signature> signature = v8::Local<v8::Signature>(), - v8::ConstructorBehavior behavior = v8::ConstructorBehavior::kAllow, - v8::SideEffectType side_effect = v8::SideEffectType::kHasSideEffect, - const v8::CFunction* c_function = nullptr); - - // Convenience methods for NewFunctionTemplate(). - void SetMethod(v8::Local<v8::Object> that, - const char* name, - v8::FunctionCallback callback); - - void SetFastMethod(v8::Local<v8::Object> that, - const char* name, - v8::FunctionCallback slow_callback, - const v8::CFunction* c_function); - - void SetProtoMethod(v8::Local<v8::FunctionTemplate> that, - const char* name, - v8::FunctionCallback callback); - - void SetInstanceMethod(v8::Local<v8::FunctionTemplate> that, - const char* name, - v8::FunctionCallback callback); - - // Safe variants denote the function has no side effects. - void SetMethodNoSideEffect(v8::Local<v8::Object> that, - const char* name, - v8::FunctionCallback callback); - void SetProtoMethodNoSideEffect(v8::Local<v8::FunctionTemplate> that, - const char* name, - v8::FunctionCallback callback); - - enum class SetConstructorFunctionFlag { - NONE, - SET_CLASS_NAME, - }; - - void SetConstructorFunction(v8::Local<v8::Object> that, - const char* name, - v8::Local<v8::FunctionTemplate> tmpl, - SetConstructorFunctionFlag flag = - SetConstructorFunctionFlag::SET_CLASS_NAME); - - void SetConstructorFunction(v8::Local<v8::Object> that, - v8::Local<v8::String> name, - v8::Local<v8::FunctionTemplate> tmpl, - SetConstructorFunctionFlag flag = - SetConstructorFunctionFlag::SET_CLASS_NAME); - void AtExit(void (*cb)(void* arg), void* arg); void RunAtExitCallbacks(); |
