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

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

Issue 2554393003: Add null-check for context_wrapper->context() in ForeignFetchRequestHandler. (Closed)
Patch Set: Created 4 years 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/foreign_fetch_request_handler.cc
diff --git a/content/browser/service_worker/foreign_fetch_request_handler.cc b/content/browser/service_worker/foreign_fetch_request_handler.cc
index ab2d134554e4e818f0ddf3edda12dfdea52706f4..889730446f5ab5cda4baddf521987c99cf50f0aa 100644
--- a/content/browser/service_worker/foreign_fetch_request_handler.cc
+++ b/content/browser/service_worker/foreign_fetch_request_handler.cc
@@ -82,8 +82,10 @@ void ForeignFetchRequestHandler::InitializeHandler(
if (!IsForeignFetchEnabled())
return;
- if (!context_wrapper)
+ if (!context_wrapper || !context_wrapper->context() ||
+ provider_id == kInvalidServiceWorkerProviderId) {
return;
+ }
if (skip_service_worker == SkipServiceWorker::ALL)
return;
« 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