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

Unified Diff: mojo/apps/js/js_app.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.cc ('k') | mojo/apps/js/main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/apps/js/js_app.cc
diff --git a/mojo/apps/js/js_app.cc b/mojo/apps/js/js_app.cc
index c6d3b910ad11defe14d59512c8eee99457601412..db51c09e716e71aeab5746883fdefba134316bf9 100644
--- a/mojo/apps/js/js_app.cc
+++ b/mojo/apps/js/js_app.cc
@@ -47,7 +47,7 @@ bool JSApp::Start() {
void JSApp::Quit() {
CHECK(on_js_app_thread());
- // The the terminate operation is posted to the message_loop so that
+ // The terminate operation is posted to the message_loop so that
// the shell_runner isn't destroyed before this JS function returns.
thread_.message_loop()->PostTask(
FROM_HERE, base::Bind(&JSApp::Terminate, base::Unretained(this)));
@@ -80,6 +80,7 @@ void JSApp::Run() {
gin::IsolateHolder::Initialize(gin::IsolateHolder::kStrictMode,
gin::ArrayBufferAllocator::SharedInstance());
isolate_holder_.reset(new gin::IsolateHolder());
+ isolate_holder_->AddRunMicrotasksObserver();
shell_runner_.reset(
new gin::ShellRunner(&runner_delegate_, isolate_holder_->isolate()));
@@ -90,6 +91,7 @@ void JSApp::Run() {
}
void JSApp::Terminate() {
+ isolate_holder_->RemoveRunMicrotasksObserver();
shell_runner_.reset(NULL);
// This JSApp's thread must be stopped on the thread that started it. Ask the
« no previous file with comments | « gin/run_microtasks_observer.cc ('k') | mojo/apps/js/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698