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

Unified Diff: third_party/WebKit/Source/core/frame/Frame.cpp

Issue 2009453002: service worker: Don't control a subframe of an insecure context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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/frame/Frame.cpp
diff --git a/third_party/WebKit/Source/core/frame/Frame.cpp b/third_party/WebKit/Source/core/frame/Frame.cpp
index 3e1d8f5dc32177c475b9715771f81a1d8b05b666..600e126387fb094ec3d3baded04a10dbae5d6236 100644
--- a/third_party/WebKit/Source/core/frame/Frame.cpp
+++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -305,6 +305,15 @@ void Frame::didChangeVisibilityState()
childFrames[i]->didChangeVisibilityState();
}
+bool Frame::canHaveSecureChild(String* errorMessage) const
+{
+ for (const Frame* parent = this; parent; parent = parent->tree().parent()) {
+ if (!parent->securityContext()->getSecurityOrigin()->isPotentiallyTrustworthy(errorMessage))
+ return false;
+ }
+ return true;
+}
+
Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
: m_treeNode(this)
, m_host(host)

Powered by Google App Engine
This is Rietveld 408576698