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

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

Issue 838903002: Replicate sandbox flags for OOPIF (Blink part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@iframe-sandbox-flags-part1
Patch Set: Address Daniel's comments. Move sandbox flags inheritance to FrameLoader::effectiveSandboxFlags(). Created 5 years, 11 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
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index d93f1b81c51cecd8a2f4031ea20e3b04611e3fad..8a962b1d6e641eb7f07ab34ba898f9b1c45a093b 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -1377,9 +1377,11 @@ void FrameLoader::dispatchDidClearWindowObjectInMainWorld()
SandboxFlags FrameLoader::effectiveSandboxFlags() const
{
SandboxFlags flags = m_forcedSandboxFlags;
- // FIXME: We need a way to propagate sandbox flags to out-of-process frames.
if (FrameOwner* frameOwner = m_frame->owner())
flags |= frameOwner->sandboxFlags();
+ // Frames need to inherit the sandbox flags of their parent frame.
+ if (Frame* parentFrame = m_frame->tree().parent())
+ flags |= parentFrame->securityContext()->sandboxFlags();
Nate Chapin 2015/01/22 19:00:28 This is ok, but I can't help but feel that we shou
dcheng 2015/01/22 19:05:53 I guess the counter-argument is it's nice to have
return flags;
}
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698