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

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

Issue 2019613003: ServiceWorker: Bypass SW when the script doesn't have fetch handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/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 59fe4846dfdedca40e239a131337244232f20f80..9eddf9688cfb265c2c4f45bdc75ff71225d9c22b 100644
--- a/content/browser/service_worker/foreign_fetch_request_handler.cc
+++ b/content/browser/service_worker/foreign_fetch_request_handler.cc
@@ -197,7 +197,8 @@ void ForeignFetchRequestHandler::DidFindRegistration(
origin_matches = true;
}
- if (!scope_matches || !origin_matches) {
+ if (!scope_matches || !origin_matches ||
+ !active_version->has_fetch_handler()) {
Marijn Kruisselbrink 2016/05/27 16:18:12 This is probably not correct. Foreign fetch events
shimazu 2016/05/30 05:41:59 Sorry, it's true! Done.
job->FallbackToNetwork();
return;
}

Powered by Google App Engine
This is Rietveld 408576698