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

Issue 2868043002: Add CHECK on session start for profile construction (Closed)

Created:
3 years, 7 months ago by emaxx
Modified:
3 years, 7 months ago
Reviewers:
xiyuan, msarda
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add CHECK on session start for profile construction Fail fast from the profile construction when it's triggered without starting a session first. Crashing the browser is arguably a worth thing to do, as it prevents running the browser in unexpected environment (which may lead to, for instance, bypassing the managed policies). Also this CHECK should provide the stack traces which are more likely to point to the culprit code (as opposed to crashing at some later point asynchronously - like e.g. on the CHECK added at https://crrev.com/2801993002). BUG=719939 TEST=existing browser tests; manual tests: normal login; Guest login; restart-after-crash. Review-Url: https://codereview.chromium.org/2868043002 Cr-Commit-Position: refs/heads/master@{#470524} Committed: https://chromium.googlesource.com/chromium/src/+/f588c3bceb117e579068d1b4b3bb4153642d941d

Patch Set 1 #

Total comments: 2

Patch Set 2 : CHECK -> LOG_IF(FATAL) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -10 lines) Patch
M chrome/browser/profiles/profile_impl.cc View 1 4 chunks +22 lines, -5 lines 0 comments Download
M components/session_manager/core/session_manager.h View 2 chunks +4 lines, -0 lines 0 comments Download
M components/session_manager/core/session_manager.cc View 2 chunks +9 lines, -5 lines 0 comments Download

Messages

Total messages: 26 (20 generated)
emaxx
xiyuan@, msarda@: PTAL. Does this whole approach look reasonable to you?
3 years, 7 months ago (2017-05-09 15:55:16 UTC) #7
xiyuan
lgtm https://codereview.chromium.org/2868043002/diff/1/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): https://codereview.chromium.org/2868043002/diff/1/chrome/browser/profiles/profile_impl.cc#newcode436 chrome/browser/profiles/profile_impl.cc:436: CHECK(session_manager::SessionManager::Get()->HasSessionForAccountId( nit: CHECK -> LOG_IF(FATAL, ...) CHECK crashes ...
3 years, 7 months ago (2017-05-09 16:30:52 UTC) #10
emaxx
https://codereview.chromium.org/2868043002/diff/1/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): https://codereview.chromium.org/2868043002/diff/1/chrome/browser/profiles/profile_impl.cc#newcode436 chrome/browser/profiles/profile_impl.cc:436: CHECK(session_manager::SessionManager::Get()->HasSessionForAccountId( On 2017/05/09 16:30:52, xiyuan wrote: > nit: CHECK ...
3 years, 7 months ago (2017-05-09 17:11:46 UTC) #11
msarda
LGTM.
3 years, 7 months ago (2017-05-10 10:46:53 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2868043002/20001
3 years, 7 months ago (2017-05-10 10:49:32 UTC) #23
commit-bot: I haz the power
3 years, 7 months ago (2017-05-10 11:15:16 UTC) #26
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/f588c3bceb117e579068d1b4b3bb...

Powered by Google App Engine
This is Rietveld 408576698