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

Issue 7590026: chromeos: Try to avoid LoginUtilsImpl delegate segfault. (Closed)

Created:
9 years, 4 months ago by Daniel Erat
Modified:
9 years, 4 months ago
Reviewers:
altimofeev
CC:
chromium-reviews, nkostylev+cc_chromium.org, davemoore+watch_chromium.org, Evan Martin, zel
Visibility:
Public.

Description

chromeos: Try to avoid LoginUtilsImpl delegate segfault. This makes LoginUtilsImpl::OnProfileCreated() check that its delegate is non-NULL before using it. I'm hoping that this will avoid a segfault that's apparently showing up during testing when Chrome is killed during initialization. Note that this is just a temporary workaround; the underlying code is possibly still incorrect (or relying on incorrect assumptions about the order in which things will happen). BUG=chromium-os:18269 TEST=none TBR=altimofeev@chromium.org

Patch Set 1 #

Patch Set 2 : add TODO #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -1 line) Patch
M chrome/browser/chromeos/login/login_utils.cc View 1 1 chunk +8 lines, -1 line 1 comment Download

Messages

Total messages: 6 (0 generated)
Daniel Erat
9 years, 4 months ago (2011-08-10 17:40:26 UTC) #1
Evan Martin
I believe this may work around the bug, but is it Correct?
9 years, 4 months ago (2011-08-10 17:44:29 UTC) #2
Daniel Erat
On 2011/08/10 17:44:29, Evan Martin wrote: > I believe this may work around the bug, ...
9 years, 4 months ago (2011-08-10 18:14:07 UTC) #3
Evan Martin
LGTM On Wed, Aug 10, 2011 at 11:14 AM, <derat@chromium.org> wrote: > On 2011/08/10 17:44:29, ...
9 years, 4 months ago (2011-08-10 18:28:13 UTC) #4
altimofeev
http://codereview.chromium.org/7590026/diff/3001/chrome/browser/chromeos/login/login_utils.cc File chrome/browser/chromeos/login/login_utils.cc (right): http://codereview.chromium.org/7590026/diff/3001/chrome/browser/chromeos/login/login_utils.cc#newcode567 chrome/browser/chromeos/login/login_utils.cc:567: // LoginUtilsImpl::PrepareProfile() has set |delegate_| when Chrome is killed ...
9 years, 4 months ago (2011-08-10 20:12:42 UTC) #5
Daniel Erat
9 years, 4 months ago (2011-08-10 20:59:26 UTC) #6
On Wed, Aug 10, 2011 at 13:12,  <altimofeev@chromium.org> wrote:
>
>
http://codereview.chromium.org/7590026/diff/3001/chrome/browser/chromeos/logi...
> File chrome/browser/chromeos/login/login_utils.cc (right):
>
>
http://codereview.chromium.org/7590026/diff/3001/chrome/browser/chromeos/logi...
> chrome/browser/chromeos/login/login_utils.cc:567: //
> LoginUtilsImpl::PrepareProfile() has set |delegate_| when Chrome is
> killed
> Actually, only LoginUtilsImpl:: PrepareProflie does invoke
> CreateDefaultProfileAsync(this), which starts profile loading and makes
> ProfileManager to callback in the end (note, it passes 'this' as
> ProfileManager::Observer).  So |delegate_| should be initialized before
> ProfileManager even gets to know about 'this' observer.
>
> Why do you think, that Oshima's suggestion is wrong - singleton is
> deleted in the main thread, but UI thread is alive and tries to use it?

(replied at http://crosbug.com/18269)

> http://codereview.chromium.org/7590026/
>

Powered by Google App Engine
This is Rietveld 408576698