From 200abfc43eaa09d95ace70bbfc505604e90551fa Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Mon, 12 May 2025 20:57:54 +0100 Subject: [PATCH] src: remove unused `shouldRetryAsESM` internal binding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/58265 Reviewed-By: Yagiz Nizipli Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca Reviewed-By: Darshan Sen Reviewed-By: James M Snell Reviewed-By: Ulises Gascón Reviewed-By: Marco Ippolito --- src/node_contextify.cc | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 9669961c6ef..c0e84dbca0f 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -1884,21 +1884,6 @@ bool ShouldRetryAsESM(Realm* realm, return false; } -static void ShouldRetryAsESM(const FunctionCallbackInfo& args) { - Realm* realm = Realm::GetCurrent(args); - - CHECK_EQ(args.Length(), 3); // message, code, resource_name - CHECK(args[0]->IsString()); - Local message = args[0].As(); - CHECK(args[1]->IsString()); - Local code = args[1].As(); - CHECK(args[2]->IsString()); - Local resource_name = args[2].As(); - - args.GetReturnValue().Set( - ShouldRetryAsESM(realm, message, code, resource_name)); -} - static void ContainsModuleSyntax(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); Local context = isolate->GetCurrentContext(); @@ -2003,7 +1988,6 @@ void CreatePerIsolateProperties(IsolateData* isolate_data, CompileFunctionForCJSLoader); SetMethod(isolate, target, "containsModuleSyntax", ContainsModuleSyntax); - SetMethod(isolate, target, "shouldRetryAsESM", ShouldRetryAsESM); } static void CreatePerContextProperties(Local target, @@ -2049,7 +2033,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(WatchdogHasPendingSigint); registry->Register(MeasureMemory); registry->Register(ContainsModuleSyntax); - registry->Register(ShouldRetryAsESM); } } // namespace contextify } // namespace node