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

Side by Side Diff: content/browser/devtools/render_frame_devtools_agent_host.cc

Issue 2563863002: Clear navigation_handle early in RenderFrameHostImpl destructor. (Closed)
Patch Set: Created 4 years 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 | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/devtools/render_frame_devtools_agent_host.h" 5 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
6 6
7 #include <tuple> 7 #include <tuple>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/guid.h" 10 #include "base/guid.h"
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 current_->DispatchProtocolMessage( 905 current_->DispatchProtocolMessage(
906 pair.second.session_id, pair.first, pair.second.method, 906 pair.second.session_id, pair.first, pair.second.method,
907 pair.second.message); 907 pair.second.message);
908 } 908 }
909 in_navigation_protocol_message_buffer_.clear(); 909 in_navigation_protocol_message_buffer_.clear();
910 } 910 }
911 } 911 }
912 912
913 void RenderFrameDevToolsAgentHost::UpdateProtocolHandlers( 913 void RenderFrameDevToolsAgentHost::UpdateProtocolHandlers(
914 RenderFrameHostImpl* host) { 914 RenderFrameHostImpl* host) {
915 #if DCHECK_IS_ON()
916 // Check that we don't have stale host object here by accessing some random
917 // properties inside.
918 if (handlers_frame_host_ && handlers_frame_host_->GetRenderWidgetHost())
919 handlers_frame_host_->GetRenderWidgetHost()->GetRoutingID();
920 #endif
915 handlers_frame_host_ = host; 921 handlers_frame_host_ = host;
916 dom_handler_->SetRenderFrameHost(host); 922 dom_handler_->SetRenderFrameHost(host);
917 if (emulation_handler_) 923 if (emulation_handler_)
918 emulation_handler_->SetRenderFrameHost(host); 924 emulation_handler_->SetRenderFrameHost(host);
919 input_handler_->SetRenderWidgetHost( 925 input_handler_->SetRenderWidgetHost(
920 host ? host->GetRenderWidgetHost() : nullptr); 926 host ? host->GetRenderWidgetHost() : nullptr);
921 inspector_handler_->SetRenderFrameHost(host); 927 inspector_handler_->SetRenderFrameHost(host);
922 network_handler_->SetRenderFrameHost(host); 928 network_handler_->SetRenderFrameHost(host);
923 if (page_handler_) 929 if (page_handler_)
924 page_handler_->SetRenderFrameHost(host); 930 page_handler_->SetRenderFrameHost(host);
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 RenderFrameHost* host) { 1146 RenderFrameHost* host) {
1141 return (current_ && current_->host() == host) || 1147 return (current_ && current_->host() == host) ||
1142 (pending_ && pending_->host() == host); 1148 (pending_ && pending_->host() == host);
1143 } 1149 }
1144 1150
1145 bool RenderFrameDevToolsAgentHost::IsChildFrame() { 1151 bool RenderFrameDevToolsAgentHost::IsChildFrame() {
1146 return current_ && current_->host()->GetParent(); 1152 return current_ && current_->host()->GetParent();
1147 } 1153 }
1148 1154
1149 } // namespace content 1155 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698