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

Unified Diff: mojo/edk/js/drain_data.cc

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: . Created 3 years, 9 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 | « mojo/edk/js/drain_data.h ('k') | mojo/edk/js/waiting_callback.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/js/drain_data.cc
diff --git a/mojo/edk/js/drain_data.cc b/mojo/edk/js/drain_data.cc
index cfd0bb5c8005c28fb9237f3756f57180b71c2295..334ced32e759e9a69b2a221676aa7d67a51bb65f 100644
--- a/mojo/edk/js/drain_data.cc
+++ b/mojo/edk/js/drain_data.cc
@@ -23,7 +23,7 @@ namespace js {
DrainData::DrainData(v8::Isolate* isolate, mojo::Handle handle)
: isolate_(isolate),
handle_(DataPipeConsumerHandle(handle.value())),
- handle_watcher_(FROM_HERE) {
+ handle_watcher_(FROM_HERE, SimpleWatcher::ArmingPolicy::AUTOMATIC) {
v8::Handle<v8::Context> context(isolate_->GetCurrentContext());
runner_ = gin::PerContextData::From(context)->runner()->GetWeakPtr();
@@ -43,7 +43,7 @@ DrainData::~DrainData() {
}
void DrainData::WaitForData() {
- handle_watcher_.Start(
+ handle_watcher_.Watch(
handle_.get(), MOJO_HANDLE_SIGNAL_READABLE,
base::Bind(&DrainData::DataReady, base::Unretained(this)));
}
« no previous file with comments | « mojo/edk/js/drain_data.h ('k') | mojo/edk/js/waiting_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698