OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |