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

Unified Diff: content/browser/geofencing/geofencing_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
Index: content/browser/geofencing/geofencing_manager.cc
diff --git a/content/browser/geofencing/geofencing_manager.cc b/content/browser/geofencing/geofencing_manager.cc
index 1fce30f3b4d5feb049d4049d7bb3404af6a4aff8..ca53d46bf0b68a90f45c376435ce9910b93bf653 100644
--- a/content/browser/geofencing/geofencing_manager.cc
+++ b/content/browser/geofencing/geofencing_manager.cc
@@ -395,11 +395,11 @@ void GeofencingManager::DeliverGeofencingEvent(
// until the callback dies. Otherwise the registration could be released when
// this method returns - before the event is delivered to the service worker.
active_version->RunAfterStartWorker(
- base::Bind(&GeofencingManager::OnEventError, this),
base::Bind(&GeofencingManager::DeliverEventToRunningWorker, this,
service_worker_registration, event_type,
registration->region_id, registration->region,
- make_scoped_refptr(active_version)));
+ make_scoped_refptr(active_version)),
+ base::Bind(&GeofencingManager::OnEventError, this));
}
void GeofencingManager::DeliverEventToRunningWorker(

Powered by Google App Engine
This is Rietveld 408576698