Skip to content

Commit efadb10

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

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

src/env-inl.h

-16
Original file line numberDiff line numberDiff line change
@@ -957,22 +957,6 @@ inline void Environment::SetTemplateMethod(v8::Local<v8::FunctionTemplate> that,
957957
t->SetClassName(name_string); // NODE_SET_METHOD() compatibility.
958958
}
959959

960-
inline void Environment::SetTemplateMethodNoSideEffect(
961-
v8::Local<v8::FunctionTemplate> that,
962-
const char* name,
963-
v8::FunctionCallback callback) {
964-
v8::Local<v8::FunctionTemplate> t =
965-
NewFunctionTemplate(callback, v8::Local<v8::Signature>(),
966-
v8::ConstructorBehavior::kAllow,
967-
v8::SideEffectType::kHasNoSideEffect);
968-
// kInternalized strings are created in the old space.
969-
const v8::NewStringType type = v8::NewStringType::kInternalized;
970-
v8::Local<v8::String> name_string =
971-
v8::String::NewFromUtf8(isolate(), name, type).ToLocalChecked();
972-
that->Set(name_string, t);
973-
t->SetClassName(name_string); // NODE_SET_METHOD() compatibility.
974-
}
975-
976960
void Environment::AddCleanupHook(void (*fn)(void*), void* arg) {
977961
auto insertion_info = cleanup_hooks_.emplace(CleanupHookCallback {
978962
fn, arg, cleanup_hook_counter_++

src/env.h

-4
Original file line numberDiff line numberDiff line change
@@ -889,10 +889,6 @@ class Environment {
889889
inline void SetProtoMethodNoSideEffect(v8::Local<v8::FunctionTemplate> that,
890890
const char* name,
891891
v8::FunctionCallback callback);
892-
inline void SetTemplateMethodNoSideEffect(
893-
v8::Local<v8::FunctionTemplate> that,
894-
const char* name,
895-
v8::FunctionCallback callback);
896892

897893
void BeforeExit(void (*cb)(void* arg), void* arg);
898894
void RunBeforeExitCallbacks();

0 commit comments

Comments
 (0)