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

Unified Diff: base/synchronization/waitable_event_watcher_posix.cc

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « base/deferred_sequenced_task_runner_unittest.cc ('k') | base/task/cancelable_task_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/synchronization/waitable_event_watcher_posix.cc
diff --git a/base/synchronization/waitable_event_watcher_posix.cc b/base/synchronization/waitable_event_watcher_posix.cc
index aa425f255002fe81ba81edeed366447860eabbbf..7cf8688d4c448f0d659f8e2a4fad30e0eac41823 100644
--- a/base/synchronization/waitable_event_watcher_posix.cc
+++ b/base/synchronization/waitable_event_watcher_posix.cc
@@ -145,8 +145,8 @@ bool WaitableEventWatcher::StartWatching(
cancel_flag_ = new Flag;
callback_ = callback;
- internal_callback_ =
- base::Bind(&AsyncCallbackHelper, cancel_flag_, callback_, event);
+ internal_callback_ = base::Bind(
+ &AsyncCallbackHelper, base::RetainedRef(cancel_flag_), callback_, event);
WaitableEvent::WaitableEventKernel* kernel = event->kernel_.get();
AutoLock locked(kernel->lock_);
« no previous file with comments | « base/deferred_sequenced_task_runner_unittest.cc ('k') | base/task/cancelable_task_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698