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

Unified Diff: content/child/background_sync/background_sync_provider_thread_proxy.cc

Issue 1139643008: [BackgroundSync] Fix lifetime issues with callbacks pointer in CallbackThreadAdapter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/background_sync/background_sync_provider_thread_proxy.cc
diff --git a/content/child/background_sync/background_sync_provider_thread_proxy.cc b/content/child/background_sync/background_sync_provider_thread_proxy.cc
index 2361c4bd154e29e98d0201f5153add2a61e5c56e..378c45c2cd4cdaff6952a662aeabe040a9a7af30 100644
--- a/content/child/background_sync/background_sync_provider_thread_proxy.cc
+++ b/content/child/background_sync/background_sync_provider_thread_proxy.cc
@@ -40,7 +40,7 @@ class CallbackThreadAdapter : public blink::WebCallbacks<S, T> {
WorkerTaskRunner::Instance()->PostTask(
worker_thread_id_,
base::Bind(&blink::WebCallbacks<S, T>::onSuccess,
- base::Unretained(callbacks_.get()), results));
+ base::Owned(callbacks_.release()), results));
}
virtual void onError(T* error) {
@@ -49,7 +49,7 @@ class CallbackThreadAdapter : public blink::WebCallbacks<S, T> {
WorkerTaskRunner::Instance()->PostTask(
worker_thread_id_,
base::Bind(&blink::WebCallbacks<S, T>::onError,
- base::Unretained(callbacks_.get()), error));
+ base::Owned(callbacks_.release()), error));
}
private:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698