summaryrefslogtreecommitdiffstats
path: root/gin/run_microtasks_observer.cc
blob: f453a66a1ebdcb46df60c1ece6888a5af3be58a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "gin/run_microtasks_observer.h"

namespace gin {

RunMicrotasksObserver::RunMicrotasksObserver(v8::Isolate* isolate)
    : isolate_(isolate) {
}

void RunMicrotasksObserver::WillProcessTask(const base::PendingTask& task) {
}

void RunMicrotasksObserver::DidProcessTask(const base::PendingTask& task) {
  v8::Isolate::Scope scope(isolate_);
  isolate_->RunMicrotasks();
}

}  // namespace gin