| 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 b238477105003a682e4f1cb4b27883b6aa3125cc..8f11b8e5c465dad5957fa827936b7f65e98d328d 100644
|
| --- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
|
| @@ -314,7 +314,7 @@ void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& reque
|
| m_fetcher->stopFetching();
|
| return;
|
| }
|
| - if (!frameLoader()->shouldContinueForNavigationPolicy(m_request, SubstituteData(), this, m_navigationType, NavigationPolicyCurrentTab, replacesCurrentHistoryItem(), isClientRedirect())) {
|
| + if (!frameLoader()->shouldContinueForNavigationPolicy(m_request, SubstituteData(), this, CheckContentSecurityPolicy, m_navigationType, NavigationPolicyCurrentTab, replacesCurrentHistoryItem(), isClientRedirect())) {
|
| m_fetcher->stopFetching();
|
| return;
|
| }
|
| @@ -614,14 +614,7 @@ bool DocumentLoader::maybeLoadEmpty()
|
| return true;
|
| }
|
|
|
| -void DocumentLoader::loadUnique()
|
| -{
|
| - m_request = ResourceRequest(SecurityOrigin::urlWithUniqueSecurityOrigin());
|
| - m_response = ResourceResponse(m_request.url(), "text/html", 0, nullAtom, String());
|
| - finishedLoading(monotonicallyIncreasingTime());
|
| -}
|
| -
|
| -void DocumentLoader::startLoadingMainResource(ContentSecurityPolicyDisposition cspDisposition)
|
| +void DocumentLoader::startLoadingMainResource()
|
| {
|
| timing().markNavigationStart();
|
| ASSERT(!m_mainResource);
|
| @@ -638,15 +631,10 @@ void DocumentLoader::startLoadingMainResource(ContentSecurityPolicyDisposition c
|
| DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions,
|
| (DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, CheckContentSecurityPolicy, DocumentContext));
|
| FetchRequest fetchRequest(m_request, FetchInitiatorTypeNames::document, mainResourceLoadOptions);
|
| - fetchRequest.setContentSecurityCheck(cspDisposition);
|
| -
|
| m_mainResource = RawResource::fetchMainResource(fetchRequest, fetcher(), m_substituteData);
|
| if (!m_mainResource) {
|
| - // If we block a main resource request, ensure that the resulting frame's
|
| - // origin is unique, and that the redirect list is up-to-date with the
|
| - // resource we actually commit:
|
| - loadUnique();
|
| - appendRedirect(SecurityOrigin::urlWithUniqueSecurityOrigin());
|
| + m_request = ResourceRequest(blankURL());
|
| + maybeLoadEmpty();
|
| return;
|
| }
|
| // A bunch of headers are set when the underlying ResourceLoader is created, and m_request needs to include those.
|
|
|