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

Unified Diff: content/browser/devtools/render_frame_devtools_agent_host.cc

Issue 2720823004: React to non commited render frame navigations in devtools. (Closed)
Patch Set: Added test. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/devtools/site_per_process_devtools_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/render_frame_devtools_agent_host.cc
diff --git a/content/browser/devtools/render_frame_devtools_agent_host.cc b/content/browser/devtools/render_frame_devtools_agent_host.cc
index 51bdb0810d848a450c4a306ba3631f5ba200e637..e5d64bff2495b7f09f841a5510aeccd5034d340d 100644
--- a/content/browser/devtools/render_frame_devtools_agent_host.cc
+++ b/content/browser/devtools/render_frame_devtools_agent_host.cc
@@ -649,18 +649,17 @@ void RenderFrameDevToolsAgentHost::DidFinishNavigation(
scoped_refptr<RenderFrameDevToolsAgentHost> protect(this);
if (!IsBrowserSideNavigationEnabled()) {
- if (navigation_handle->IsErrorPage()) {
- if (pending_ &&
- pending_->host() == navigation_handle->GetRenderFrameHost()) {
- DiscardPending();
- }
- } else if (navigation_handle->HasCommitted()) {
+ if (navigation_handle->HasCommitted() &&
+ !navigation_handle->IsErrorPage()) {
if (pending_ &&
pending_->host() == navigation_handle->GetRenderFrameHost()) {
CommitPending();
}
if (session())
protocol::TargetHandler::FromSession(session())->UpdateServiceWorkers();
+ } else if (pending_ &&
+ pending_->host() == navigation_handle->GetRenderFrameHost()) {
+ DiscardPending();
}
DCHECK(CheckConsistency());
return;
« no previous file with comments | « no previous file | content/browser/devtools/site_per_process_devtools_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698