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

Unified Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 7590026: chromeos: Try to avoid LoginUtilsImpl delegate segfault. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add TODO Created 9 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 7b3d88ba48e5984d484a89c0179ee9d7f91c9f0c..192136c337dc1e1b9795066348522b75aabd54c4 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -562,7 +562,14 @@ void LoginUtilsImpl::OnProfileCreated(Profile* user_profile, Status status) {
user_profile->OnLogin();
- delegate_->OnProfilePrepared(user_profile);
+ // TODO(altimofeev): This pointer should probably never be NULL, but it looks
+ // like LoginUtilsImpl::OnProfileCreated() may be getting called before
+ // LoginUtilsImpl::PrepareProfile() has set |delegate_| when Chrome is killed
altimofeev 2011/08/10 20:12:42 Actually, only LoginUtilsImpl:: PrepareProflie doe
+ // during shutdown in tests -- see http://crosbug.com/18269. Replace this
+ // 'if' statement with a CHECK(delegate_) once the underlying issue is
+ // resolved.
+ if (delegate_)
+ delegate_->OnProfilePrepared(user_profile);
// TODO(altimofeev): Need to sanitize memory used to store password.
credentials_ = GaiaAuthConsumer::ClientLoginResult();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698