Chromium Code Reviews| 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 cc0ad50ff53128a6702981667a49762ad371388b..997b89364457b29b4f3f91f8e61986737cd7a0e8 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.cc |
| +++ b/content/browser/frame_host/render_frame_host_impl.cc |
| @@ -1224,7 +1224,19 @@ 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. |
|
Charlie Reis
2015/06/03 20:01:37
If this is still main-frame only for now, we can p
alexmos
2015/06/05 22:34:31
Done.
|
| - delegate_->DidDisownOpener(this); |
| + |
| + // 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 swapped out RenderViewHosts for this tab. This is important |
|
Charlie Reis
2015/06/03 20:01:37
I think this comment was stale. It's notifying al
alexmos
2015/06/05 22:34:31
Done.
|
| + // 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) { |