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

Unified Diff: chrome/renderer/net/net_error_helper.cc

Issue 1516623002: Attempt to fix a renderer crash in NetErrorHelperCore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/errorpage_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/net/net_error_helper.cc
diff --git a/chrome/renderer/net/net_error_helper.cc b/chrome/renderer/net/net_error_helper.cc
index d739cdcbc44664e7e8da4885f899c7aa579661f5..e15afb0067c0fab5b206af44e7ad80e5868ae189 100644
--- a/chrome/renderer/net/net_error_helper.cc
+++ b/chrome/renderer/net/net_error_helper.cc
@@ -112,6 +112,11 @@ void NetErrorHelper::DidStartProvisionalLoad() {
void NetErrorHelper::DidCommitProvisionalLoad(bool is_new_navigation,
bool is_same_page_navigation) {
+ // If this is a "same page" navigation, it's not a real navigation. There
+ // wasn't a start event for it, either, so just ignore it.
+ if (is_same_page_navigation)
+ return;
+
// Invalidate weak pointers from old error page controllers. If loading a new
// error page, the controller has not yet been attached, so this won't affect
// it.
« no previous file with comments | « chrome/browser/errorpage_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698