| Index: content/browser/web_contents/web_contents_impl.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
| index 51b9177457e1af899003fd4dcc2cf9f4a6a6d154..f1a9d024d50559d60344967d00736597c7a02855 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -3670,17 +3670,19 @@ void WebContentsImpl::DidAccessInitialDocument() {
|
| }
|
|
|
| void WebContentsImpl::DidDisownOpener(RenderFrameHost* render_frame_host) {
|
| - if (opener_) {
|
| - // Clear our opener so that future cross-process navigations don't have an
|
| - // opener assigned.
|
| - RemoveDestructionObserver(opener_);
|
| - opener_ = NULL;
|
| - }
|
| + // No action is necessary if the opener has already been cleared.
|
| + if (!opener_)
|
| + return;
|
| +
|
| + // Clear our opener so that future cross-process navigations don't have an
|
| + // opener assigned.
|
| + RemoveDestructionObserver(opener_);
|
| + opener_ = NULL;
|
|
|
| // Notify all swapped out RenderViewHosts for this tab. This is important
|
| // in case we go back to them, or if another window in those processes tries
|
| // to access window.opener.
|
| - GetRenderManager()->DidDisownOpener(render_frame_host->GetRenderViewHost());
|
| + GetRenderManager()->DidDisownOpener(render_frame_host);
|
| }
|
|
|
| void WebContentsImpl::DocumentOnLoadCompleted(
|
|
|