| 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 068e3fab304ac5131089500c54fe9e2428bfd8e0..9b213107576e47752ea75ff9f498be888be9d1aa 100644
|
| --- a/content/browser/service_worker/foreign_fetch_request_handler.cc
|
| +++ b/content/browser/service_worker/foreign_fetch_request_handler.cc
|
| @@ -69,16 +69,16 @@ void ForeignFetchRequestHandler::InitializeHandler(
|
| if (!initiated_in_secure_context)
|
| return;
|
|
|
| - if (!context_wrapper->OriginHasForeignFetchRegistrations(
|
| - request->url().GetOrigin())) {
|
| + if (ServiceWorkerUtils::IsMainResourceType(resource_type))
|
| return;
|
| - }
|
|
|
| if (request->initiator().IsSameOriginWith(url::Origin(request->url())))
|
| return;
|
|
|
| - if (ServiceWorkerUtils::IsMainResourceType(resource_type))
|
| + if (!context_wrapper->OriginHasForeignFetchRegistrations(
|
| + request->url().GetOrigin())) {
|
| return;
|
| + }
|
|
|
| // Any more precise checks to see if the request should be intercepted are
|
| // asynchronous, so just create our handler in all cases.
|
|
|