| 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 6e40365f50427c11537fd6791fca87f43d0181d1..df9a980f612ddd94af525d4fdc270554c0f7ce53 100644
|
| --- a/content/child/background_sync/background_sync_provider_thread_proxy.cc
|
| +++ b/content/child/background_sync/background_sync_provider_thread_proxy.cc
|
| @@ -20,6 +20,11 @@ namespace content {
|
|
|
| namespace {
|
|
|
| +template <typename S, typename T>
|
| +void RunOnSuccess(scoped_ptr<blink::WebCallbacks<S, T>> callbacks, S* results) {
|
| + callbacks->onSuccess(results);
|
| +}
|
| +
|
| // CallbackThreadAdapter<S,T> is a wrapper for WebCallbacks<S,T> which
|
| // switches to a specific thread before calling the wrapped callback's
|
| // onSuccess or onError methods.
|
| @@ -39,8 +44,8 @@ class CallbackThreadAdapter : public blink::WebCallbacks<S, T> {
|
| // silently discarded.
|
| WorkerTaskRunner::Instance()->PostTask(
|
| worker_thread_id_,
|
| - base::Bind(&blink::WebCallbacks<S, T>::onSuccess,
|
| - base::Owned(callbacks_.release()), results));
|
| + base::Bind(&RunOnSuccess<S, T>, base::Passed(callbacks_.Pass()),
|
| + results));
|
| }
|
|
|
| virtual void onError(T* error) {
|
|
|