| Index: content/browser/frame_host/render_frame_host_impl.cc
|
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
| index c8cc6470d22ab8354ec7efc73f3fe424d35e1d55..367f03dc54f7e12a59e7ccd72537629fdd41f00e 100644
|
| --- a/content/browser/frame_host/render_frame_host_impl.cc
|
| +++ b/content/browser/frame_host/render_frame_host_impl.cc
|
| @@ -1222,9 +1222,23 @@ void RenderFrameHostImpl::OnDidAccessInitialDocument() {
|
| }
|
|
|
| void RenderFrameHostImpl::OnDidDisownOpener() {
|
| - // This message is only sent for top-level frames. TODO(avi): when frame tree
|
| - // mirroring works correctly, add a check here to enforce it.
|
| - delegate_->DidDisownOpener(this);
|
| + // This message is only sent for top-level frames for now.
|
| + // TODO(alexmos): This should eventually support subframe openers as well,
|
| + // and it should allow openers to be updated to another frame (which can
|
| + // happen via window.open('','framename')) in addition to being disowned.
|
| +
|
| + // No action is necessary if the opener has already been cleared.
|
| + if (!frame_tree_node_->opener())
|
| + return;
|
| +
|
| + // Clear our opener so that future cross-process navigations don't have an
|
| + // opener assigned.
|
| + frame_tree_node_->SetOpener(nullptr);
|
| +
|
| + // Notify all other RenderFrameHosts and RenderFrameProxies for this frame.
|
| + // This is important in case we go back to them, or if another window in
|
| + // those processes tries to access window.opener.
|
| + frame_tree_node_->render_manager()->DidDisownOpener(this);
|
| }
|
|
|
| void RenderFrameHostImpl::OnDidChangeName(const std::string& name) {
|
|
|