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

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

Issue 2730873002: Avoid fetching RFH from navigation handle for not committed navigations. (Closed)
Patch Set: Created 3 years, 9 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 (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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 650
651 if (!IsBrowserSideNavigationEnabled()) { 651 if (!IsBrowserSideNavigationEnabled()) {
652 if (navigation_handle->HasCommitted() && 652 if (navigation_handle->HasCommitted() &&
653 !navigation_handle->IsErrorPage()) { 653 !navigation_handle->IsErrorPage()) {
654 if (pending_ && 654 if (pending_ &&
655 pending_->host() == navigation_handle->GetRenderFrameHost()) { 655 pending_->host() == navigation_handle->GetRenderFrameHost()) {
656 CommitPending(); 656 CommitPending();
657 } 657 }
658 if (session()) 658 if (session())
659 protocol::TargetHandler::FromSession(session())->UpdateServiceWorkers(); 659 protocol::TargetHandler::FromSession(session())->UpdateServiceWorkers();
660 } else if (pending_ && 660 } else if (pending_ && pending_->host()->GetFrameTreeNodeId() ==
661 pending_->host() == navigation_handle->GetRenderFrameHost()) { 661 navigation_handle->GetFrameTreeNodeId()) {
662 DiscardPending(); 662 DiscardPending();
663 } 663 }
664 DCHECK(CheckConsistency()); 664 DCHECK(CheckConsistency());
665 return; 665 return;
666 } 666 }
667 667
668 // If the navigation is not tracked, return; 668 // If the navigation is not tracked, return;
669 if (navigating_handles_.count(navigation_handle) == 0) 669 if (navigating_handles_.count(navigation_handle) == 0)
670 return; 670 return;
671 671
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 RenderFrameHost* host) { 1178 RenderFrameHost* host) {
1179 return (current_ && current_->host() == host) || 1179 return (current_ && current_->host() == host) ||
1180 (pending_ && pending_->host() == host); 1180 (pending_ && pending_->host() == host);
1181 } 1181 }
1182 1182
1183 bool RenderFrameDevToolsAgentHost::IsChildFrame() { 1183 bool RenderFrameDevToolsAgentHost::IsChildFrame() {
1184 return current_ && current_->host()->GetParent(); 1184 return current_ && current_->host()->GetParent();
1185 } 1185 }
1186 1186
1187 } // namespace content 1187 } // 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