Fix sandbox flags for RenderFrameProxies created via OnCreateChildFrame.
commit6e0ee0c991cb221d1ee3d5b0098d4dca1733ea1b
authoralexmos <alexmos@chromium.org>
Fri, 1 May 2015 18:57:34 +0000 (1 11:57 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 1 May 2015 18:58:34 +0000 (1 18:58 +0000)
tree7600faeb077dc9c5a40b86acaa5d329bd01fa57d
parentbe04a5ef853a8f08527f029ed4cc1cce4893af96
Fix sandbox flags for RenderFrameProxies created via OnCreateChildFrame.

After the fix for https://crbug.com/423587, we create proxies in other
SiteInstances for new child frames.  However, the sandbox flags for
those proxies were not set properly: the flags were set on the FTN
after the proxies were already created in FrameTree::AddFrame, so the
proxies always ended up with empty sandbox flags.  If those proxies
ever parented a local child, the child would not inherit the right
sandbox flags.

This CL fixes this by plumbing sandbox flags into FrameTree::AddFrame
and then into the FTN's constructor.

BUG=423587

Review URL: https://codereview.chromium.org/1066943006

Cr-Commit-Position: refs/heads/master@{#327952}
content/browser/frame_host/frame_tree.cc
content/browser/frame_host/frame_tree.h
content/browser/frame_host/frame_tree_node.cc
content/browser/frame_host/frame_tree_node.h
content/browser/frame_host/frame_tree_unittest.cc
content/browser/frame_host/render_frame_host_impl.cc
content/browser/site_per_process_browsertest.cc
content/common/frame_replication_state.cc
content/common/frame_replication_state.h
content/renderer/render_frame_impl_browsertest.cc
content/test/data/frame_tree/page_with_one_frame.html