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

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

Issue 2833723004: Check the existence of SWContext in DidUpdateNavigationPreloadEnabled/Hexistence (Closed)
Patch Set: Created 3 years, 8 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 b105177362fbcb2cdc4518d473ae8b5e7695af24..a5b344bc87eac2d0c5ac84d792aadabe422d3c51 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -1552,6 +1552,8 @@ void ServiceWorkerDispatcherHost::DidUpdateNavigationPreloadEnabled(
std::string(kDatabaseErrorMessage)));
return;
}
+ if (!GetContext())
+ return;
ServiceWorkerRegistration* registration =
GetContext()->GetLiveRegistration(registration_id);
if (registration)
@@ -1572,6 +1574,8 @@ void ServiceWorkerDispatcherHost::DidUpdateNavigationPreloadHeader(
std::string(kDatabaseErrorMessage)));
return;
}
+ if (!GetContext())
+ return;
ServiceWorkerRegistration* registration =
GetContext()->GetLiveRegistration(registration_id);
if (registration)
« 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