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..623cbf61f90b30c2ced77a665620cb7e00e39237 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -3670,12 +3670,14 @@ 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. |
Charlie Reis
2014/08/22 19:41:23
Bug 4: There was a risk of sending unnecessary not
|
+ 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 |