From cdf0e09135dc6f084b541cd7091e368cad3dffe8 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Tue, 5 Mar 2019 21:51:09 +0800 Subject: [PATCH] src: delete unused method SetTemplateMethodNoSideEffect PR-URL: https://github.com/nodejs/node/pull/26451 Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- src/env-inl.h | 16 ---------------- src/env.h | 4 ---- 2 files changed, 20 deletions(-) diff --git a/src/env-inl.h b/src/env-inl.h index 2a560f71d24bc1..6386981215a00b 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -957,22 +957,6 @@ inline void Environment::SetTemplateMethod(v8::Local that, t->SetClassName(name_string); // NODE_SET_METHOD() compatibility. } -inline void Environment::SetTemplateMethodNoSideEffect( - v8::Local that, - const char* name, - v8::FunctionCallback callback) { - v8::Local t = - NewFunctionTemplate(callback, v8::Local(), - v8::ConstructorBehavior::kAllow, - v8::SideEffectType::kHasNoSideEffect); - // kInternalized strings are created in the old space. - const v8::NewStringType type = v8::NewStringType::kInternalized; - v8::Local 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_++ diff --git a/src/env.h b/src/env.h index 30b7c7343572d6..83585ceb99846a 100644 --- a/src/env.h +++ b/src/env.h @@ -889,10 +889,6 @@ class Environment { inline void SetProtoMethodNoSideEffect(v8::Local that, const char* name, v8::FunctionCallback callback); - inline void SetTemplateMethodNoSideEffect( - v8::Local that, - const char* name, - v8::FunctionCallback callback); void BeforeExit(void (*cb)(void* arg), void* arg); void RunBeforeExitCallbacks();