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

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

Issue 2841123002: [DevTools] Listen to RenderFrameHostChanged after crash with PlzNavigate (Closed)
Patch Set: windows fix Created 3 years, 8 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 | « content/browser/devtools/protocol/devtools_protocol_browsertest.cc ('k') | 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 (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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 755
756 void RenderFrameDevToolsAgentHost::RenderFrameHostChanged( 756 void RenderFrameDevToolsAgentHost::RenderFrameHostChanged(
757 RenderFrameHost* old_host, 757 RenderFrameHost* old_host,
758 RenderFrameHost* new_host) { 758 RenderFrameHost* new_host) {
759 // CommitPending may destruct |this|. 759 // CommitPending may destruct |this|.
760 scoped_refptr<RenderFrameDevToolsAgentHost> protect(this); 760 scoped_refptr<RenderFrameDevToolsAgentHost> protect(this);
761 761
762 if (session()) 762 if (session())
763 protocol::TargetHandler::FromSession(session())->UpdateFrames(); 763 protocol::TargetHandler::FromSession(session())->UpdateFrames();
764 764
765 if (IsBrowserSideNavigationEnabled()) 765 if (IsBrowserSideNavigationEnabled() && !current_frame_crashed_)
766 return; 766 return;
767 767
768 DCHECK(!pending_ || pending_->host() != old_host); 768 DCHECK(!pending_ || pending_->host() != old_host);
769 if (!current_ || current_->host() != old_host) { 769 if (!current_ || current_->host() != old_host) {
770 DCHECK(CheckConsistency()); 770 DCHECK(CheckConsistency());
771 return; 771 return;
772 } 772 }
773 773
774 // AboutToNavigateRenderFrame was not called for renderer-initiated 774 // AboutToNavigateRenderFrame was not called for renderer-initiated
775 // navigation. 775 // navigation.
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 RenderFrameHost* host) { 1168 RenderFrameHost* host) {
1169 return (current_ && current_->host() == host) || 1169 return (current_ && current_->host() == host) ||
1170 (pending_ && pending_->host() == host); 1170 (pending_ && pending_->host() == host);
1171 } 1171 }
1172 1172
1173 bool RenderFrameDevToolsAgentHost::IsChildFrame() { 1173 bool RenderFrameDevToolsAgentHost::IsChildFrame() {
1174 return current_ && current_->host()->GetParent(); 1174 return current_ && current_->host()->GetParent();
1175 } 1175 }
1176 1176
1177 } // namespace content 1177 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/devtools_protocol_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698