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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2022083002: Move 'frame-src' CSP checks into FrameFetchContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase+Content+Sandbox 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: 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 2a76e14272ea498a29abb8fc6931284c241d6a05..56885c71b7c98f4786eda454792f057a7694e12c 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -608,6 +608,13 @@ 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()
{
timing().markNavigationStart();
@@ -627,8 +634,7 @@ void DocumentLoader::startLoadingMainResource()
FetchRequest fetchRequest(m_request, FetchInitiatorTypeNames::document, mainResourceLoadOptions);
m_mainResource = RawResource::fetchMainResource(fetchRequest, fetcher(), m_substituteData);
if (!m_mainResource) {
- m_request = ResourceRequest(blankURL());
- maybeLoadEmpty();
+ loadUnique();
return;
}
// A bunch of headers are set when the underlying ResourceLoader is created, and m_request needs to include those.

Powered by Google App Engine
This is Rietveld 408576698