Index: third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
index 0f767c7707b65a68cc3db550b3d3aed72a16ccf8..dcafae089fccdf255e1fe328d0e042b354bc1c8a 100644 |
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
@@ -315,7 +315,7 @@ void DocumentLoader::finishedLoading(double finishTime) |
clearMainResourceHandle(); |
} |
-void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& request, const ResourceResponse& redirectResponse) |
+bool DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& request, const ResourceResponse& redirectResponse) |
{ |
DCHECK_EQ(resource, m_mainResource); |
DCHECK(!redirectResponse.isNull()); |
@@ -327,18 +327,17 @@ void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& reque |
RefPtr<SecurityOrigin> redirectingOrigin = SecurityOrigin::create(redirectResponse.url()); |
if (!redirectingOrigin->canDisplay(requestURL)) { |
FrameLoader::reportLocalLoadFailed(m_frame, requestURL.getString()); |
- m_fetcher->stopFetching(); |
- return; |
- } |
- if (!frameLoader()->shouldContinueForNavigationPolicy(m_request, SubstituteData(), this, CheckContentSecurityPolicy, m_navigationType, NavigationPolicyCurrentTab, replacesCurrentHistoryItem(), isClientRedirect())) { |
- m_fetcher->stopFetching(); |
- return; |
+ return false; |
} |
+ if (!frameLoader()->shouldContinueForNavigationPolicy(m_request, SubstituteData(), this, CheckContentSecurityPolicy, m_navigationType, NavigationPolicyCurrentTab, replacesCurrentHistoryItem(), isClientRedirect())) |
+ return false; |
DCHECK(timing().fetchStart()); |
appendRedirect(requestURL); |
didRedirect(redirectResponse.url(), requestURL); |
frameLoader()->client()->dispatchDidReceiveServerRedirectForProvisionalLoad(); |
+ |
+ return true; |
} |
static bool canShowMIMEType(const String& mimeType, LocalFrame* frame) |