refactor: avoid deprecated v8::Context::GetIsolate() calls (pt 2) (#47879)

* refactor: add a v8::Isolate* arg to Constructible::GetConstructor()

* refactor: add a v8::Isolate* arg to NodeBindings::Initialize()

This is needed for the GetConstructor() call

* refactor: avoid v8::Context::GetIsolate() call in GetIpcObject() by taking it as an arg

* refactor: avoid v8::Context::GetIsolate() call in ipc_native::EmitIPCEvent() by taking it as an arg
This commit is contained in:
Charles Kerr 2025-07-28 10:22:27 -05:00 committed by GitHub
commit 2255bb620a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 42 additions and 36 deletions

View file

@ -98,7 +98,7 @@ void ElectronApiServiceImpl::Message(bool internal,
v8::Local<v8::Value> args = gin::ConvertToV8(isolate, arguments);
ipc_native::EmitIPCEvent(context, internal, channel, {}, args);
ipc_native::EmitIPCEvent(isolate, context, internal, channel, {}, args);
}
void ElectronApiServiceImpl::ReceivePostMessage(
@ -125,7 +125,7 @@ void ElectronApiServiceImpl::ReceivePostMessage(
std::vector<v8::Local<v8::Value>> args = {message_value};
ipc_native::EmitIPCEvent(context, false, channel, ports,
ipc_native::EmitIPCEvent(isolate, context, false, channel, ports,
gin::ConvertToV8(isolate, args));
}