refactor: only pass v8::Context
to gin_helper::MicrotasksScope
constructor (#45484)
refactor: forward v8::Context to v8::MicrotasksScope constructor
This commit is contained in:
parent
326957009a
commit
517935cd55
14 changed files with 23 additions and 37 deletions
|
@ -5,13 +5,15 @@
|
|||
#include "shell/common/gin_helper/microtasks_scope.h"
|
||||
|
||||
#include "shell/common/process_util.h"
|
||||
#include "v8/include/v8-context.h"
|
||||
|
||||
namespace gin_helper {
|
||||
|
||||
MicrotasksScope::MicrotasksScope(v8::Isolate* isolate,
|
||||
v8::MicrotaskQueue* microtask_queue,
|
||||
MicrotasksScope::MicrotasksScope(v8::Local<v8::Context> context,
|
||||
bool ignore_browser_checkpoint,
|
||||
v8::MicrotasksScope::Type scope_type) {
|
||||
auto* isolate = context->GetIsolate();
|
||||
auto* microtask_queue = context->GetMicrotaskQueue();
|
||||
if (electron::IsBrowserProcess()) {
|
||||
if (!ignore_browser_checkpoint)
|
||||
v8::MicrotasksScope::PerformCheckpoint(isolate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue