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

Unified Diff: content/browser/navigator_connect/navigator_connect_context_impl.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/navigator_connect/navigator_connect_context_impl.cc
diff --git a/content/browser/navigator_connect/navigator_connect_context_impl.cc b/content/browser/navigator_connect/navigator_connect_context_impl.cc
index c393c4bf45a318321165ec3a6fb7bcb7e7a1d931..f571b9fe5fd2037eadec5bac874d0bad33c7e34d 100644
--- a/content/browser/navigator_connect/navigator_connect_context_impl.cc
+++ b/content/browser/navigator_connect/navigator_connect_context_impl.cc
@@ -154,11 +154,11 @@ void NavigatorConnectContextImpl::GotServiceWorkerRegistration(
registration->pattern().GetOrigin();
active_version->RunAfterStartWorker(
- base::Bind(&NavigatorConnectContextImpl::OnConnectError, this, callback,
- client_port_id, service_port_id),
base::Bind(&NavigatorConnectContextImpl::DispatchConnectEvent, this,
callback, client_port_id, service_port_id, registration,
- make_scoped_refptr(active_version)));
+ make_scoped_refptr(active_version)),
+ base::Bind(&NavigatorConnectContextImpl::OnConnectError, this, callback,
+ client_port_id, service_port_id));
}
void NavigatorConnectContextImpl::DispatchConnectEvent(
« no previous file with comments | « content/browser/geofencing/geofencing_manager.cc ('k') | content/browser/service_worker/service_worker_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698