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

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 667423002: DevTools: failure of loading internal requests should not be reported. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | « Source/core/fetch/FetchContext.cpp ('k') | Source/core/loader/FrameFetchContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index c0398306ccda6e14cfd5df2e77aa966fc14a0f0b..e6d13535757fe6171ad088c3e2218dda1bcc5d07 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -1313,7 +1313,8 @@ void ResourceFetcher::didChangeLoadingPriority(const Resource* resource, Resourc
void ResourceFetcher::didFailLoading(const Resource* resource, const ResourceError& error)
{
TRACE_EVENT_ASYNC_END0("net", "Resource", resource);
- context().dispatchDidFail(m_documentLoader, resource->identifier(), error);
+ bool isInternalRequest = resource->options().initiatorInfo.name == FetchInitiatorTypeNames::internal;
+ context().dispatchDidFail(m_documentLoader, resource->identifier(), error, isInternalRequest);
}
void ResourceFetcher::willSendRequest(unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse, const FetchInitiatorInfo& initiatorInfo)
@@ -1329,7 +1330,8 @@ void ResourceFetcher::didReceiveResponse(const Resource* resource, const Resourc
if (response.wasFetchedViaServiceWorker()) {
if (!canRequest(resource->type(), resource->resourceRequest(), response.url(), resource->options(), false, FetchRequest::UseDefaultOriginRestrictionForType)) {
resource->loader()->cancel();
- context().dispatchDidFail(m_documentLoader, resource->identifier(), ResourceError(errorDomainBlinkInternal, 0, response.url().string(), "Unsafe attempt to load URL " + response.url().elidedString() + " fetched by a ServiceWorker."));
+ bool isInternalRequest = resource->options().initiatorInfo.name == FetchInitiatorTypeNames::internal;
+ context().dispatchDidFail(m_documentLoader, resource->identifier(), ResourceError(errorDomainBlinkInternal, 0, response.url().string(), "Unsafe attempt to load URL " + response.url().elidedString() + " fetched by a ServiceWorker."), isInternalRequest);
return;
}
}
« no previous file with comments | « Source/core/fetch/FetchContext.cpp ('k') | Source/core/loader/FrameFetchContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698