Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: gin/run_microtasks_observer.cc

Issue 577733002: Mojo JS bindings: draining a DataPipe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More size_t Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gin/run_microtasks_observer.h ('k') | mojo/apps/js/js_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/run_microtasks_observer.cc
diff --git a/gin/run_microtasks_observer.cc b/gin/run_microtasks_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f453a66a1ebdcb46df60c1ece6888a5af3be58a8
--- /dev/null
+++ b/gin/run_microtasks_observer.cc
@@ -0,0 +1,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
« no previous file with comments | « gin/run_microtasks_observer.h ('k') | mojo/apps/js/js_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698