blob: f453a66a1ebdcb46df60c1ece6888a5af3be58a8 [file] [log] [blame]
James Robinsona9763132014-10-06 11:18:13 -07001// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "gin/run_microtasks_observer.h"
6
7namespace gin {
8
9RunMicrotasksObserver::RunMicrotasksObserver(v8::Isolate* isolate)
10 : isolate_(isolate) {
11}
12
13void RunMicrotasksObserver::WillProcessTask(const base::PendingTask& task) {
14}
15
16void RunMicrotasksObserver::DidProcessTask(const base::PendingTask& task) {
17 v8::Isolate::Scope scope(isolate_);
18 isolate_->RunMicrotasks();
19}
20
21} // namespace gin