Skip to content

Commit 989fcef

Browse files
gengjiawenBridgeAR
authored andcommitted
src: delete unused method SetTemplateMethod
PR-URL: #26451 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent efadb10 commit 989fcef

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

src/env-inl.h

-15
Original file line numberDiff line numberDiff line change
@@ -942,21 +942,6 @@ inline void Environment::SetProtoMethodNoSideEffect(
942942
t->SetClassName(name_string); // NODE_SET_PROTOTYPE_METHOD() compatibility.
943943
}
944944

945-
inline void Environment::SetTemplateMethod(v8::Local<v8::FunctionTemplate> that,
946-
const char* name,
947-
v8::FunctionCallback callback) {
948-
v8::Local<v8::FunctionTemplate> t =
949-
NewFunctionTemplate(callback, v8::Local<v8::Signature>(),
950-
v8::ConstructorBehavior::kAllow,
951-
v8::SideEffectType::kHasSideEffect);
952-
// kInternalized strings are created in the old space.
953-
const v8::NewStringType type = v8::NewStringType::kInternalized;
954-
v8::Local<v8::String> name_string =
955-
v8::String::NewFromUtf8(isolate(), name, type).ToLocalChecked();
956-
that->Set(name_string, t);
957-
t->SetClassName(name_string); // NODE_SET_METHOD() compatibility.
958-
}
959-
960945
void Environment::AddCleanupHook(void (*fn)(void*), void* arg) {
961946
auto insertion_info = cleanup_hooks_.emplace(CleanupHookCallback {
962947
fn, arg, cleanup_hook_counter_++

src/env.h

-3
Original file line numberDiff line numberDiff line change
@@ -878,9 +878,6 @@ class Environment {
878878
inline void SetProtoMethod(v8::Local<v8::FunctionTemplate> that,
879879
const char* name,
880880
v8::FunctionCallback callback);
881-
inline void SetTemplateMethod(v8::Local<v8::FunctionTemplate> that,
882-
const char* name,
883-
v8::FunctionCallback callback);
884881

885882
// Safe variants denote the function has no side effects.
886883
inline void SetMethodNoSideEffect(v8::Local<v8::Object> that,

0 commit comments

Comments
 (0)