| Index: content/browser/background_sync/background_sync_manager.cc
|
| diff --git a/content/browser/background_sync/background_sync_manager.cc b/content/browser/background_sync/background_sync_manager.cc
|
| index 97ba87a7e522916fdb14951138adeb80a658b34d..cad67586a526872c259fea3b4ab2e8f7c64175e4 100644
|
| --- a/content/browser/background_sync/background_sync_manager.cc
|
| +++ b/content/browser/background_sync/background_sync_manager.cc
|
| @@ -687,13 +687,13 @@ void BackgroundSyncManager::RegisterDidStore(
|
| registration_could_fire,
|
| BackgroundSyncMetrics::REGISTRATION_IS_NOT_DUPLICATE);
|
|
|
| - FireReadyEvents();
|
| -
|
| - base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| + base::ThreadTaskRunnerHandle::Get()->PostTaskAndReply(
|
| FROM_HERE,
|
| base::Bind(callback, BACKGROUND_SYNC_STATUS_OK,
|
| base::Passed(base::MakeUnique<BackgroundSyncRegistration>(
|
| - new_registration))));
|
| + new_registration))),
|
| + base::Bind(&BackgroundSyncManager::FireReadyEvents,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| }
|
|
|
| void BackgroundSyncManager::RemoveActiveRegistration(int64_t sw_registration_id,
|
|
|