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

Unified Diff: third_party/WebKit/Source/core/mojo/MojoWatcher.cpp

Issue 2891193002: Mojo JS bindings: switch all mojo/ layout tests to use the new mode. (Closed)
Patch Set: . Created 3 years, 7 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 | « third_party/WebKit/LayoutTests/mojo/validation.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/mojo/MojoWatcher.cpp
diff --git a/third_party/WebKit/Source/core/mojo/MojoWatcher.cpp b/third_party/WebKit/Source/core/mojo/MojoWatcher.cpp
index 2e0eb8c188d8fd10a68a9045221e05bbde646c59..d25446ad95bd8e7dc64d5c52b06427821ca1131c 100644
--- a/third_party/WebKit/Source/core/mojo/MojoWatcher.cpp
+++ b/third_party/WebKit/Source/core/mojo/MojoWatcher.cpp
@@ -170,6 +170,10 @@ void MojoWatcher::RunReadyCallback(MojoResult result) {
RunWatchCallback(callback_, this, result);
+ // The user callback may have canceled watching.
+ if (!watcher_handle_.is_valid())
+ return;
+
// Rearm the watcher so another notification can fire.
//
// TODO(rockot): MojoWatcher should expose some better approximation of the
« no previous file with comments | « third_party/WebKit/LayoutTests/mojo/validation.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698