Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2280783002: Don't forward load event when a RenderFrameHost is pending deletion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use is_active() to check pending deletion Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after
1770 const BeginNavigationParams& begin_params) { 1770 const BeginNavigationParams& begin_params) {
1771 CHECK(IsBrowserSideNavigationEnabled()); 1771 CHECK(IsBrowserSideNavigationEnabled());
1772 CommonNavigationParams validated_params = common_params; 1772 CommonNavigationParams validated_params = common_params;
1773 GetProcess()->FilterURL(false, &validated_params.url); 1773 GetProcess()->FilterURL(false, &validated_params.url);
1774 frame_tree_node()->navigator()->OnBeginNavigation( 1774 frame_tree_node()->navigator()->OnBeginNavigation(
1775 frame_tree_node(), validated_params, begin_params); 1775 frame_tree_node(), validated_params, begin_params);
1776 } 1776 }
1777 1777
1778 void RenderFrameHostImpl::OnDispatchLoad() { 1778 void RenderFrameHostImpl::OnDispatchLoad() {
1779 CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible()); 1779 CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible());
1780
1781 // Don't forward the load event if this RFH is pending deletion. This can
1782 // happen in a race where this RenderFrameHost finishes loading just after
1783 // the frame navigates away. See https://crbug.com/626802.
1784 if (!is_active())
1785 return;
1786
1780 // Only frames with an out-of-process parent frame should be sending this 1787 // Only frames with an out-of-process parent frame should be sending this
1781 // message. 1788 // message.
1782 RenderFrameProxyHost* proxy = 1789 RenderFrameProxyHost* proxy =
1783 frame_tree_node()->render_manager()->GetProxyToParent(); 1790 frame_tree_node()->render_manager()->GetProxyToParent();
1784 if (!proxy) { 1791 if (!proxy) {
1785 bad_message::ReceivedBadMessage(GetProcess(), 1792 bad_message::ReceivedBadMessage(GetProcess(),
1786 bad_message::RFH_NO_PROXY_TO_PARENT); 1793 bad_message::RFH_NO_PROXY_TO_PARENT);
1787 return; 1794 return;
1788 } 1795 }
1789 1796
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
3046 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3053 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3047 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3054 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3048 return web_bluetooth_service_.get(); 3055 return web_bluetooth_service_.get();
3049 } 3056 }
3050 3057
3051 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3058 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3052 web_bluetooth_service_.reset(); 3059 web_bluetooth_service_.reset();
3053 } 3060 }
3054 3061
3055 } // namespace content 3062 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698