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; |
} |