summaryrefslogtreecommitdiffstats
path: root/base/files/file_path_watcher_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/files/file_path_watcher_linux.cc')
-rw-r--r--base/files/file_path_watcher_linux.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/files/file_path_watcher_linux.cc b/base/files/file_path_watcher_linux.cc
index c9be4ba..86c963c 100644
--- a/base/files/file_path_watcher_linux.cc
+++ b/base/files/file_path_watcher_linux.cc
@@ -412,7 +412,8 @@ void FilePathWatcherImpl::Cancel() {
// Switch to the message_loop_ if necessary so we can access |watches_|.
if (!message_loop()->BelongsToCurrentThread()) {
message_loop()->PostTask(FROM_HERE,
- new FilePathWatcher::CancelTask(this));
+ base::Bind(&FilePathWatcher::CancelWatch,
+ make_scoped_refptr(this)));
} else {
CancelOnMessageLoopThread();
}