2018-10-15 15:26:47 +00:00
|
|
|
|
|
|
|
// Copyright (c) 2018 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/browser/microtasks_runner.h"
|
2018-10-15 15:26:47 +00:00
|
|
|
#include "v8/include/v8.h"
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
namespace electron {
|
2018-10-15 15:26:47 +00:00
|
|
|
|
|
|
|
MicrotasksRunner::MicrotasksRunner(v8::Isolate* isolate) : isolate_(isolate) {}
|
|
|
|
|
2019-12-11 00:22:35 +00:00
|
|
|
void MicrotasksRunner::WillProcessTask(const base::PendingTask& pending_task,
|
|
|
|
bool was_blocked_or_low_priority) {}
|
2018-10-15 15:26:47 +00:00
|
|
|
|
|
|
|
void MicrotasksRunner::DidProcessTask(const base::PendingTask& pending_task) {
|
|
|
|
v8::Isolate::Scope scope(isolate_);
|
|
|
|
v8::MicrotasksScope::PerformCheckpoint(isolate_);
|
|
|
|
}
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
} // namespace electron
|