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

Unified Diff: chrome/browser/android/offline_pages/recent_tab_helper.cc

Issue 2030793002: Remove overeager DCHECK in SnapshotController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added test Created 4 years, 7 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 | components/offline_pages/snapshot_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/offline_pages/recent_tab_helper.cc
diff --git a/chrome/browser/android/offline_pages/recent_tab_helper.cc b/chrome/browser/android/offline_pages/recent_tab_helper.cc
index 5eb1a3f1d41b96be993c68614ae159d53bc6510a..6510827409698140901dc0c11109e495cf04ec95 100644
--- a/chrome/browser/android/offline_pages/recent_tab_helper.cc
+++ b/chrome/browser/android/offline_pages/recent_tab_helper.cc
@@ -65,8 +65,9 @@ RecentTabHelper::~RecentTabHelper() {
void RecentTabHelper::DidFinishNavigation(
content::NavigationHandle* navigation_handle) {
if (navigation_handle->IsInMainFrame() &&
- navigation_handle->HasCommitted() &&
- !navigation_handle->IsErrorPage()) {
+ navigation_handle->HasCommitted()) {
+ // Cancel tasks in flight that relate to the previous page.
+ weak_ptr_factory_.InvalidateWeakPtrs();
// New navigation, new snapshot session.
snapshot_controller_->Reset();
snapshot_url_ = GURL::EmptyGURL();
« no previous file with comments | « no previous file | components/offline_pages/snapshot_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698