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

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

Issue 303793003: Make mixed content checking and CSP aware of RemoteFrames (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improved comments Created 6 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: Source/core/loader/DocumentLoader.cpp
diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp
index 9be513565e329ce4fae54760ae71c2aa0b3ea3a2..eb713e4b2e079d3d263dbaf857484aa1550c5f93 100644
--- a/Source/core/loader/DocumentLoader.cpp
+++ b/Source/core/loader/DocumentLoader.cpp
@@ -371,8 +371,9 @@ void DocumentLoader::willSendRequest(ResourceRequest& newRequest, const Resource
// If this is a sub-frame, check for mixed content blocking against the top frame.
if (m_frame->tree().parent()) {
- LocalFrame* top = m_frame->tree().top();
- if (!top->loader().mixedContentChecker()->canRunInsecureContent(top->document()->securityOrigin(), newRequest.url())) {
+ // FIXME: This does not yet work with out-of-process iframes.
+ Frame* top = m_frame->tree().top();
+ if (top->isLocalFrame() && !toLocalFrame(top)->loader().mixedContentChecker()->canRunInsecureContent(toLocalFrame(top)->document()->securityOrigin(), newRequest.url())) {
cancelMainResourceLoad(ResourceError::cancelledError(newRequest.url()));
return;
}

Powered by Google App Engine
This is Rietveld 408576698