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

Unified Diff: mojo/edk/js/waiting_callback.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/waiting_callback.h ('k') | mojo/edk/system/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/js/waiting_callback.cc
diff --git a/mojo/edk/js/waiting_callback.cc b/mojo/edk/js/waiting_callback.cc
index fada0395380a9ea644642578824f9c20de24c8a2..6ad4bd034711f7c177561612029cb39e179ecf84 100644
--- a/mojo/edk/js/waiting_callback.cc
+++ b/mojo/edk/js/waiting_callback.cc
@@ -32,7 +32,7 @@ gin::Handle<WaitingCallback> WaitingCallback::Create(
bool one_shot) {
gin::Handle<WaitingCallback> waiting_callback = gin::CreateHandle(
isolate, new WaitingCallback(isolate, callback, one_shot));
- MojoResult result = waiting_callback->watcher_.Start(
+ MojoResult result = waiting_callback->watcher_.Watch(
handle_wrapper->get(), signals,
base::Bind(&WaitingCallback::OnHandleReady,
base::Unretained(waiting_callback.get())));
@@ -53,7 +53,7 @@ WaitingCallback::WaitingCallback(v8::Isolate* isolate,
v8::Handle<v8::Function> callback,
bool one_shot)
: one_shot_(one_shot),
- watcher_(FROM_HERE),
+ watcher_(FROM_HERE, SimpleWatcher::ArmingPolicy::AUTOMATIC),
weak_factory_(this) {
v8::Handle<v8::Context> context = isolate->GetCurrentContext();
runner_ = gin::PerContextData::From(context)->runner()->GetWeakPtr();
« no previous file with comments | « mojo/edk/js/waiting_callback.h ('k') | mojo/edk/system/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698