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

Unified Diff: content/browser/service_worker/service_worker_dispatcher_host.cc

Issue 982743002: Fix crash in ServiceWorkerDispatcherHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_dispatcher_host.cc
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
index 6f1d95f078618c9c207087699ef8b185bcc20c84..872ac5735eab12be49c281e6448c2905f9df5e47 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -570,6 +570,9 @@ void ServiceWorkerDispatcherHost::OnSetHostedVersionId(
ServiceWorkerRegistration* registration =
GetContext()->GetLiveRegistration(version->registration_id());
DCHECK(registration);
+ // TODO(ksakamoto): This is a quick fix for crbug.com/459916.
+ if (!registration)
+ return;
// Set the document URL to the script url in order to allow
// register/unregister/getRegistration on ServiceWorkerGlobalScope.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698