summaryrefslogtreecommitdiffstats
path: root/gin/run_microtasks_observer.cc
blob: 0ca00787050ae880002e23a61c3f8ca09070d9da (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_);
  v8::MicrotasksScope::PerformCheckpoint(isolate_);
}

}  // namespace gin