From dccc227716c414402b91620b34c1ea15342aa9b1 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Sat, 10 May 2025 20:44:01 +0100 Subject: [PATCH] src: remove unused `shouldRetryAsESM` internal binding --- src/node_contextify.cc | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 9669961c6ef676..c0e84dbca0f7a1 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