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

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

Co-authored-by: Charles Kerr <charles@charleskerr.com>

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

This is needed for the GetConstructor() call

Co-authored-by: Charles Kerr <charles@charleskerr.com>

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

Co-authored-by: Charles Kerr <charles@charleskerr.com>

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

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2025-07-29 10:34:18 -04:00 committed by GitHub
commit e1e12318e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 42 additions and 36 deletions

View file

@ -1869,7 +1869,7 @@ void Initialize(v8::Local<v8::Object> exports,
void* priv) {
v8::Isolate* const isolate = electron::JavascriptEnvironment::GetIsolate();
gin_helper::Dictionary dict(isolate, exports);
dict.Set("Session", Session::GetConstructor(context));
dict.Set("Session", Session::GetConstructor(isolate, context));
dict.SetMethod("fromPartition", &FromPartition);
dict.SetMethod("fromPath", &FromPath);
}