src: remove unused shouldRetryAsESM internal binding

PR-URL: https://github.com/nodejs/node/pull/58265
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
This commit is contained in:
Dario Piotrowicz 2025-05-12 20:57:54 +01:00 committed by GitHub
parent 563be01292
commit 200abfc43e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1884,21 +1884,6 @@ bool ShouldRetryAsESM(Realm* realm,
return false;
}
static void ShouldRetryAsESM(const FunctionCallbackInfo<Value>& args) {
Realm* realm = Realm::GetCurrent(args);
CHECK_EQ(args.Length(), 3); // message, code, resource_name
CHECK(args[0]->IsString());
Local<String> message = args[0].As<String>();
CHECK(args[1]->IsString());
Local<String> code = args[1].As<String>();
CHECK(args[2]->IsString());
Local<String> resource_name = args[2].As<String>();
args.GetReturnValue().Set(
ShouldRetryAsESM(realm, message, code, resource_name));
}
static void ContainsModuleSyntax(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
Local<Context> 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<Object> 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