refactor: avoid deprecated v8::Context::GetIsolate()
calls (pt 1) (#47843)
* refactor: avoid redundant GetIsolate() calls in NodeBindings::CreateEnvironment() Xref: https://chromium-review.googlesource.com/c/v8/v8/+/6563615 Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: use v8::Isolate::GetCurrent() in Initialize() methods Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: add v8::Isolate* arg to NodeBindings::CreateEnvironment() Co-authored-by: Charles Kerr <charles@charleskerr.com> * fixup! refactor: use v8::Isolate::GetCurrent() in Initialize() methods Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: add v8::Isolate* arg to RendererClientBase::DidCreateScriptContext() Co-authored-by: Charles Kerr <charles@charleskerr.com> * fixup! refactor: add v8::Isolate* arg to NodeBindings::CreateEnvironment() Co-authored-by: Charles Kerr <charles@charleskerr.com> * fixup! fixup! refactor: use v8::Isolate::GetCurrent() in Initialize() methods refactor: prefer JavascriptEnvironment::GetIsolate() in the browser layer 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:
parent
673ec5d39e
commit
d426b92326
61 changed files with 136 additions and 110 deletions
|
@ -115,7 +115,7 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
v8::Local<v8::Value> unused,
|
||||
v8::Local<v8::Context> context,
|
||||
void* priv) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
v8::Isolate* const isolate = electron::JavascriptEnvironment::GetIsolate();
|
||||
gin_helper::Dictionary dict(isolate, exports);
|
||||
dict.Set("systemPreferences", SystemPreferences::Create(isolate));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue