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

Issue 19699007: Ensure we don't crash if user navigates back from NTP to Chrome sign-in page before it has fully lo… (Closed)

Created:
7 years, 5 months ago by nasko
Modified:
7 years, 5 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Ensure we don't crash if user navigates back from NTP to Chrome sign-in page before it has fully loaded. This CL aims to be simple, so it can be merged back to M29. It changes from DidStopLoading, which is later than needed point in time, to DidNavigateMainFrame. It is safe if we have committed a navigation to delete the previous navigation entry. I've also added checks to ensure that we don't try to remove a pending navigation entry, as it leads to bugs, as evidenced here. A follow up CL can completely remove the CurrentHistoryCleaner object, as all it does is store a single bit of state - the history entry index, and monitors for the same navigation events as OneClickSigninHelper. BUG=257277 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=213324

Patch Set 1 #

Total comments: 20

Patch Set 2 : Fixing the actual bug and cleaning up the test. #

Patch Set 3 : Add test coverage for removing a pending entry. #

Total comments: 10

Patch Set 4 : Fixing nits. #

Total comments: 6

Patch Set 5 : Move from DidNavigate to DidCommitProvisionalLoad. #

Total comments: 4

Patch Set 6 : Fixing indent. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -20 lines) Patch
M chrome/browser/safe_browsing/safe_browsing_blocking_page.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/signin/signin_browsertest.cc View 1 2 3 4 2 chunks +71 lines, -0 lines 0 comments Download
M chrome/browser/ui/sync/one_click_signin_helper.cc View 1 2 3 4 5 4 chunks +25 lines, -6 lines 0 comments Download
M content/browser/web_contents/navigation_controller_impl.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/navigation_controller_impl.cc View 1 2 3 4 1 chunk +5 lines, -3 lines 0 comments Download
M content/browser/web_contents/navigation_controller_impl_unittest.cc View 1 2 3 4 1 chunk +9 lines, -4 lines 0 comments Download
M content/public/browser/navigation_controller.h View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Charlie Reis
Drive-by comments. :) Glad you found a way to repro it! https://codereview.chromium.org/19699007/diff/1/chrome/browser/signin/signin_browsertest.cc File chrome/browser/signin/signin_browsertest.cc (right): ...
7 years, 5 months ago (2013-07-18 21:53:38 UTC) #1
nasko
Fixed the drive-bys and actually fixed the bug : ). https://codereview.chromium.org/19699007/diff/1/chrome/browser/signin/signin_browsertest.cc File chrome/browser/signin/signin_browsertest.cc (right): https://codereview.chromium.org/19699007/diff/1/chrome/browser/signin/signin_browsertest.cc#newcode30 ...
7 years, 5 months ago (2013-07-19 23:03:41 UTC) #2
nasko
Adding OWNERS rogerta@ - chrome/browser/signin/ and chrome/browser/ui/sync/ mattm@ - chrome/browser/safe_browsing/
7 years, 5 months ago (2013-07-19 23:14:05 UTC) #3
Charlie Reis
I like it, except that the end of the test makes me question my understanding ...
7 years, 5 months ago (2013-07-19 23:28:43 UTC) #4
nasko
Fixing nits and adding Roger to review from sign-in perspective. https://codereview.chromium.org/19699007/diff/7001/chrome/browser/signin/signin_browsertest.cc File chrome/browser/signin/signin_browsertest.cc (right): https://codereview.chromium.org/19699007/diff/7001/chrome/browser/signin/signin_browsertest.cc#newcode193 ...
7 years, 5 months ago (2013-07-22 16:18:28 UTC) #5
Roger Tawa OOO till Jul 10th
lgtm for chrome\browser\ui\sync A few questions about the sign in test. https://codereview.chromium.org/19699007/diff/18001/chrome/browser/signin/signin_browsertest.cc File chrome/browser/signin/signin_browsertest.cc (right): ...
7 years, 5 months ago (2013-07-22 18:35:00 UTC) #6
nasko
https://codereview.chromium.org/19699007/diff/18001/chrome/browser/signin/signin_browsertest.cc File chrome/browser/signin/signin_browsertest.cc (right): https://codereview.chromium.org/19699007/diff/18001/chrome/browser/signin/signin_browsertest.cc#newcode184 chrome/browser/signin/signin_browsertest.cc:184: observer.Wait(); On 2013/07/22 18:35:00, Roger Tawa wrote: > For ...
7 years, 5 months ago (2013-07-22 18:44:31 UTC) #7
nasko
Including mattm@ for OWNERS review of chrome/browser/safe_browsing/.
7 years, 5 months ago (2013-07-22 18:53:34 UTC) #8
Roger Tawa OOO till Jul 10th
lgtm for chrome/browser/signin/signin_browsertest.cc Sorry, I did not see your timeline, my bad. I get it ...
7 years, 5 months ago (2013-07-22 20:06:14 UTC) #9
Charlie Reis
https://codereview.chromium.org/19699007/diff/7001/chrome/browser/signin/signin_browsertest.cc File chrome/browser/signin/signin_browsertest.cc (right): https://codereview.chromium.org/19699007/diff/7001/chrome/browser/signin/signin_browsertest.cc#newcode231 chrome/browser/signin/signin_browsertest.cc:231: EXPECT_EQ(ntp_url, web_contents->GetActiveURL()); On 2013/07/22 16:18:28, nasko wrote: > On ...
7 years, 5 months ago (2013-07-22 23:18:07 UTC) #10
nasko
Fixed in a different way. Please take another look. https://codereview.chromium.org/19699007/diff/7001/chrome/browser/signin/signin_browsertest.cc File chrome/browser/signin/signin_browsertest.cc (right): https://codereview.chromium.org/19699007/diff/7001/chrome/browser/signin/signin_browsertest.cc#newcode231 chrome/browser/signin/signin_browsertest.cc:231: ...
7 years, 5 months ago (2013-07-23 20:34:47 UTC) #11
mattm
lgtm
7 years, 5 months ago (2013-07-23 21:12:45 UTC) #12
Charlie Reis
LGTM, as long as the GetLastCommittedURL changes won't cause an issue with merging. https://codereview.chromium.org/19699007/diff/26001/chrome/browser/ui/sync/one_click_signin_helper.cc File ...
7 years, 5 months ago (2013-07-23 22:39:32 UTC) #13
nasko
Fixed the nit. We are safe for merging, the method exists in M29. https://codereview.chromium.org/19699007/diff/26001/chrome/browser/ui/sync/one_click_signin_helper.cc File ...
7 years, 5 months ago (2013-07-24 00:01:40 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nasko@chromium.org/19699007/33001
7 years, 5 months ago (2013-07-24 00:07:33 UTC) #15
commit-bot: I haz the power
7 years, 5 months ago (2013-07-24 02:49:37 UTC) #16
Message was sent while issue was closed.
Change committed as 213324

Powered by Google App Engine
This is Rietveld 408576698