microtasks_runner.cc 592 B

1234567891011121314151617181920
  1. // Copyright (c) 2018 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #include "shell/browser/microtasks_runner.h"
  5. #include "v8/include/v8.h"
  6. namespace electron {
  7. MicrotasksRunner::MicrotasksRunner(v8::Isolate* isolate) : isolate_(isolate) {}
  8. void MicrotasksRunner::WillProcessTask(const base::PendingTask& pending_task) {}
  9. void MicrotasksRunner::DidProcessTask(const base::PendingTask& pending_task) {
  10. v8::Isolate::Scope scope(isolate_);
  11. v8::MicrotasksScope::PerformCheckpoint(isolate_);
  12. }
  13. } // namespace electron