src: remove unused checkMessagePort internal binding

PR-URL: https://github.com/nodejs/node/pull/58267
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.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: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Dario Piotrowicz 2025-05-12 22:44:58 +01:00 committed by GitHub
parent 200abfc43e
commit 6dcd4621bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 11 deletions

View File

@ -1141,13 +1141,6 @@ void MessagePort::Stop(const FunctionCallbackInfo<Value>& args) {
port->Stop();
}
void MessagePort::CheckType(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
args.GetReturnValue().Set(
GetMessagePortConstructorTemplate(env->isolate_data())
->HasInstance(args[0]));
}
void MessagePort::Drain(const FunctionCallbackInfo<Value>& args) {
MessagePort* port;
ASSIGN_OR_RETURN_UNWRAP(&port, args[0].As<Object>());
@ -1731,7 +1724,6 @@ static void CreatePerIsolateProperties(IsolateData* isolate_data,
// These are not methods on the MessagePort prototype, because
// the browser equivalents do not provide them.
SetMethod(isolate, target, "stopMessagePort", MessagePort::Stop);
SetMethod(isolate, target, "checkMessagePort", MessagePort::CheckType);
SetMethod(isolate, target, "drainMessagePort", MessagePort::Drain);
SetMethod(
isolate, target, "receiveMessageOnPort", MessagePort::ReceiveMessage);
@ -1767,7 +1759,6 @@ static void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
registry->Register(MessagePort::PostMessage);
registry->Register(MessagePort::Start);
registry->Register(MessagePort::Stop);
registry->Register(MessagePort::CheckType);
registry->Register(MessagePort::Drain);
registry->Register(MessagePort::ReceiveMessage);
registry->Register(MessagePort::MoveToContext);

View File

@ -261,7 +261,6 @@ class MessagePort : public HandleWrap {
static void PostMessage(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Start(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Stop(const v8::FunctionCallbackInfo<v8::Value>& args);
static void CheckType(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Drain(const v8::FunctionCallbackInfo<v8::Value>& args);
static void ReceiveMessage(const v8::FunctionCallbackInfo<v8::Value>& args);

View File

@ -23,7 +23,6 @@ export interface MessagingBinding {
MessagePort: typeof InternalMessagingBinding.MessagePort;
JSTransferable: typeof InternalMessagingBinding.JSTransferable;
stopMessagePort(port: typeof InternalMessagingBinding.MessagePort): void;
checkMessagePort(port: unknown): boolean;
drainMessagePort(port: typeof InternalMessagingBinding.MessagePort): void;
receiveMessageOnPort(port: typeof InternalMessagingBinding.MessagePort): any;
moveMessagePortToContext(port: typeof InternalMessagingBinding.MessagePort, context: any): typeof InternalMessagingBinding.MessagePort;