src: delete unused method SetTemplateMethod

PR-URL: https://github.com/nodejs/node/pull/26451
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
gengjiawen 2019-03-05 21:53:04 +08:00 committed by Ruben Bridgewater
parent dd23fc1fd5
commit 68d18714f7
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762
2 changed files with 0 additions and 18 deletions

View File

@ -942,21 +942,6 @@ inline void Environment::SetProtoMethodNoSideEffect(
t->SetClassName(name_string); // NODE_SET_PROTOTYPE_METHOD() compatibility.
}
inline void Environment::SetTemplateMethod(v8::Local<v8::FunctionTemplate> that,
const char* name,
v8::FunctionCallback callback) {
v8::Local<v8::FunctionTemplate> t =
NewFunctionTemplate(callback, v8::Local<v8::Signature>(),
v8::ConstructorBehavior::kAllow,
v8::SideEffectType::kHasSideEffect);
// kInternalized strings are created in the old space.
const v8::NewStringType type = v8::NewStringType::kInternalized;
v8::Local<v8::String> name_string =
v8::String::NewFromUtf8(isolate(), name, type).ToLocalChecked();
that->Set(name_string, t);
t->SetClassName(name_string); // NODE_SET_METHOD() compatibility.
}
void Environment::AddCleanupHook(void (*fn)(void*), void* arg) {
auto insertion_info = cleanup_hooks_.emplace(CleanupHookCallback {
fn, arg, cleanup_hook_counter_++

View File

@ -874,9 +874,6 @@ class Environment {
inline void SetProtoMethod(v8::Local<v8::FunctionTemplate> that,
const char* name,
v8::FunctionCallback callback);
inline void SetTemplateMethod(v8::Local<v8::FunctionTemplate> that,
const char* name,
v8::FunctionCallback callback);
// Safe variants denote the function has no side effects.
inline void SetMethodNoSideEffect(v8::Local<v8::Object> that,