From 021e2cf40f3de5c7892d99b64fe5f70a02a130b3 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Thu, 20 Jun 2024 00:01:54 +0100 Subject: [PATCH] src: remove unused ContextifyContext::WeakCallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/53517 Fixes: https://github.com/nodejs/node/issues/52720 Reviewed-By: Michaƫl Zasso Reviewed-By: Joyee Cheung --- src/node_contextify.cc | 7 ------- src/node_contextify.h | 2 -- 2 files changed, 9 deletions(-) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 0752a67326d310..06722624ad6d90 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -81,7 +81,6 @@ using v8::Symbol; using v8::Uint32; using v8::UnboundScript; using v8::Value; -using v8::WeakCallbackInfo; // The vm module executes code in a sandboxed environment with a different // global object than the rest of the code. This is achieved by applying @@ -416,12 +415,6 @@ void ContextifyContext::MakeContext(const FunctionCallbackInfo& args) { } } -void ContextifyContext::WeakCallback( - const WeakCallbackInfo& data) { - ContextifyContext* context = data.GetParameter(); - delete context; -} - // static ContextifyContext* ContextifyContext::ContextFromContextifiedSandbox( Environment* env, diff --git a/src/node_contextify.h b/src/node_contextify.h index afefe54cbbe4b9..023cdc5d3d8c00 100644 --- a/src/node_contextify.h +++ b/src/node_contextify.h @@ -94,8 +94,6 @@ class ContextifyContext : public BaseObject { bool produce_cached_data, v8::Local id_symbol, const errors::TryCatchScope& try_catch); - static void WeakCallback( - const v8::WeakCallbackInfo& data); static v8::Intercepted PropertyGetterCallback( v8::Local property, const v8::PropertyCallbackInfo& args);