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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2082493002: Remove WebFrame::canHaveSecureChild (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: patch for landing Created 4 years, 6 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/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 0e123a4bd445c26378da5f43e2689b6c21d2a9c0..b8bb6474ab3db3ce89ac6d5e0c8cbe212ba90fe6 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -3355,9 +3355,14 @@ bool Document::isSecureContextImpl(const SecureContextCheck privilegeContextChec
return true;
if (privilegeContextCheck == StandardSecureContextCheck) {
- Frame* parent = m_frame ? m_frame->tree().parent() : nullptr;
- if (parent && !parent->canHaveSecureChild())
- return false;
+ if (!m_frame)
+ return true;
+ Frame* parent = m_frame->tree().parent();
+ while (parent) {
+ if (!parent->securityContext()->getSecurityOrigin()->isPotentiallyTrustworthy())
+ return false;
+ parent = parent->tree().parent();
+ }
}
return true;
}
« no previous file with comments | « content/child/service_worker/service_worker_network_provider.cc ('k') | third_party/WebKit/Source/core/frame/Frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698