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

Issue 2030793002: Remove overeager DCHECK in SnapshotController. (Closed)

Created:
4 years, 6 months ago by Dmitry Titov
Modified:
4 years, 6 months ago
Reviewers:
dewittj
CC:
chromium-reviews, romax+watch_chromium.org, fgorski+watch_chromium.org, dewittj+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, dimich+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove overeager DCHECK in SnapshotController. The DCHECK is not needed because indeed the state of the controller can be 'kReady' as a result of calling Reset() on it. The scenario can be as following: - snapshot started - page is navigated while snapshot is in progress. This causes immediate Reset() on SnapshotController. - This may or may not cancel snapshot, but ultimately the RecentTabHelper will report that snapshot is completed. If the Reset() above already happened, the DCHECK will fire. It should not, since this is normal conditions. Also updated RecentTabHelper to stop posted tasks related to previous snapshot when page is re-navigated. Removed chack for IsErrorPage() since it will be done later by checking CanSavePage anyways. BUG=616570 Committed: https://crrev.com/b9c88f7c6eb09ba85ea6fce0316a9f7639fdc40b Cr-Commit-Position: refs/heads/master@{#397535}

Patch Set 1 #

Patch Set 2 : recent_tab_helper #

Patch Set 3 : added test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -3 lines) Patch
M chrome/browser/android/offline_pages/recent_tab_helper.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M components/offline_pages/snapshot_controller.cc View 1 chunk +0 lines, -1 line 0 comments Download
M components/offline_pages/snapshot_controller_unittest.cc View 1 2 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
Dmitry Titov
ptal
4 years, 6 months ago (2016-06-02 00:38:40 UTC) #2
dewittj
lgtm, is there an easy test to write that exercises this bug?
4 years, 6 months ago (2016-06-02 18:06:52 UTC) #3
Dmitry Titov
Added a simple test.
4 years, 6 months ago (2016-06-02 20:37:25 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2030793002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2030793002/40001
4 years, 6 months ago (2016-06-02 20:38:38 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-02 22:47:41 UTC) #8
commit-bot: I haz the power
4 years, 6 months ago (2016-06-02 22:49:39 UTC) #10
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/b9c88f7c6eb09ba85ea6fce0316a9f7639fdc40b
Cr-Commit-Position: refs/heads/master@{#397535}

Powered by Google App Engine
This is Rietveld 408576698