refactor: only pass v8::Context
to gin_helper::MicrotasksScope
constructor (#45503)
refactor: forward v8::Context to v8::MicrotasksScope constructor Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Milan Burda <milan.burda@gmail.com>
This commit is contained in:
parent
984b8f9b1b
commit
9d9d1afb2e
14 changed files with 23 additions and 37 deletions
|
@ -149,8 +149,7 @@ void ElectronSandboxedRendererClient::WillReleaseScriptContext(
|
|||
|
||||
auto* isolate = context->GetIsolate();
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate, context->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks};
|
||||
context, false, v8::MicrotasksScope::kDoNotRunMicrotasks};
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Context::Scope context_scope(context);
|
||||
InvokeEmitProcessEvent(context, "exit");
|
||||
|
@ -168,8 +167,7 @@ void ElectronSandboxedRendererClient::EmitProcessEvent(
|
|||
|
||||
v8::Local<v8::Context> context = GetContext(frame, isolate);
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate, context->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks};
|
||||
context, false, v8::MicrotasksScope::kDoNotRunMicrotasks};
|
||||
v8::Context::Scope context_scope(context);
|
||||
|
||||
InvokeEmitProcessEvent(context, event_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue