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
|
@ -108,6 +108,7 @@ void ElectronSandboxedRendererClient::RunScriptsAtDocumentEnd(
|
|||
}
|
||||
|
||||
void ElectronSandboxedRendererClient::DidCreateScriptContext(
|
||||
v8::Isolate* const isolate,
|
||||
v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) {
|
||||
// Only allow preload for the main frame or
|
||||
|
@ -120,7 +121,6 @@ void ElectronSandboxedRendererClient::DidCreateScriptContext(
|
|||
|
||||
// Wrap the bundle into a function that receives the binding object as
|
||||
// argument.
|
||||
auto* isolate = context->GetIsolate();
|
||||
auto binding = v8::Object::New(isolate);
|
||||
InitializeBindings(binding, context, render_frame);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue