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

Unified Diff: content/browser/background_sync/background_sync_manager.cc

Issue 1584653009: Change RunAfterStartWorker to not start the worker if it is already running. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix race condition if worker is already running Created 4 years, 11 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 | content/browser/geofencing/geofencing_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 926dbca6dc8f72c34b0e91b83f7396a25a86416f..9a8aa4cc9fd29d3b880bb4c6a57ddbfa39bf4f23 100644
--- a/content/browser/background_sync/background_sync_manager.cc
+++ b/content/browser/background_sync/background_sync_manager.cc
@@ -794,9 +794,10 @@ void BackgroundSyncManager::FireOneShotSync(
if (active_version->running_status() != ServiceWorkerVersion::RUNNING) {
active_version->RunAfterStartWorker(
- callback, base::Bind(&BackgroundSyncManager::FireOneShotSync,
- weak_ptr_factory_.GetWeakPtr(), handle_id,
- active_version, last_chance, callback));
+ base::Bind(&BackgroundSyncManager::FireOneShotSync,
+ weak_ptr_factory_.GetWeakPtr(), handle_id, active_version,
+ last_chance, callback),
+ callback);
return;
}
« no previous file with comments | « no previous file | content/browser/geofencing/geofencing_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698