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 8341088: ProfileIOData: Add a few CHECKs to help debug a crash. (Closed)

Created:
9 years, 1 month ago by James Hawkins
Modified:
9 years, 1 month ago
CC:
chromium-reviews
Visibility:
Public.

Description

ProfileIOData: Add a few CHECKs to help debug a crash. BUG=102004 TEST=none R=willchan@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107782

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -2 lines) Patch
M chrome/browser/profiles/profile_io_data.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 3 chunks +10 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
James Hawkins
9 years, 1 month ago (2011-10-27 23:06:49 UTC) #1
willchan no longer on Chromium
9 years, 1 month ago (2011-10-27 23:39:17 UTC) #2
Lgtm

Sent from my iNexus.
On Oct 27, 2011 4:06 PM, <jhawkins@chromium.org> wrote:

> Reviewers: willchan,
>
> Description:
> ProfileIOData: Add a few CHECKs to help debug a crash.
>
> BUG=102004
> TEST=none
>
> R=willchan@chromium.org
>
>
> Please review this at
http://codereview.chromium.**org/8341088/<http://codereview.chromium.org/8341...
>
> SVN Base:
svn://svn.chromium.org/chrome/**trunk/src<http://svn.chromium.org/chrome/trunk/src>
>
> Affected files:
>  M chrome/browser/profiles/**profile_io_data.h
>  M chrome/browser/profiles/**profile_io_data.cc
>
>
> Index: chrome/browser/profiles/**profile_io_data.cc
> diff --git a/chrome/browser/profiles/**profile_io_data.cc
> b/chrome/browser/profiles/**profile_io_data.cc
> index 7f138d084102e0f3fc02da9f3e5bb5**1ea43a3616..**
> 3f386316c287e6f75e6c6ff4192bd3**00595fc4df 100644
> --- a/chrome/browser/profiles/**profile_io_data.cc
> +++ b/chrome/browser/profiles/**profile_io_data.cc
> @@ -251,6 +251,8 @@ void ProfileIOData::**InitializeOnUIThread(Profile*
> profile) {
>  #if defined(ENABLE_CONFIGURATION_**POLICY)
>   url_blacklist_manager_.reset(**new policy::URLBlacklistManager(**
> pref_service));
>  #endif
> +
> +  initialized_on_UI_thread_ = true;
>  }
>
>  ProfileIOData::**AppRequestContext::**AppRequestContext() {}
> @@ -278,7 +280,8 @@ ProfileIOData::ProfileParams::**~ProfileParams() {}
>
>  ProfileIOData::ProfileIOData(**bool is_incognito)
>     : initialized_(false),
> -      ALLOW_THIS_IN_INITIALIZER_**LIST(resource_context_(this)) {
> +      ALLOW_THIS_IN_INITIALIZER_**LIST(resource_context_(this)),
> +      initialized_on_UI_thread_(**false) {
>   DCHECK(BrowserThread::**CurrentlyOn(BrowserThread::UI)**);
>  }
>
> @@ -390,7 +393,12 @@ void ProfileIOData::LazyInitialize(**) const {
>   DCHECK(BrowserThread::**CurrentlyOn(BrowserThread::IO)**);
>   if (initialized_)
>     return;
> -  DCHECK(profile_params_.get());
> +
> +  // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
> +  CHECK(initialized_on_UI_**thread_);
> +
> +  // TODO(jhawkins): Return to DCHECK once crbug.com/102004 is fixed.
> +  CHECK(profile_params_.get());
>
>   IOThread* const io_thread = profile_params_->io_thread;
>   IOThread::Globals* const io_thread_globals = io_thread->globals();
> Index: chrome/browser/profiles/**profile_io_data.h
> diff --git a/chrome/browser/profiles/**profile_io_data.h
> b/chrome/browser/profiles/**profile_io_data.h
> index 9787647ba2fe8252e300c365e9624a**c0eae8ba52..**
> bd4134cb1db59a838de0f6468b9486**0107b86f0d 100644
> --- a/chrome/browser/profiles/**profile_io_data.h
> +++ b/chrome/browser/profiles/**profile_io_data.h
> @@ -314,6 +314,9 @@ class ProfileIOData {
>   // One AppRequestContext per isolated app.
>   mutable AppRequestContextMap app_request_context_map_;
>
> +  // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
> +  bool initialized_on_UI_thread_;
> +
>   DISALLOW_COPY_AND_ASSIGN(**ProfileIOData);
>  };
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698