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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 8341088: ProfileIOData: Add a few CHECKs to help debug a crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | « chrome/browser/profiles/profile_io_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7f138d084102e0f3fc02da9f3e5bb51ea43a3616..3f386316c287e6f75e6c6ff4192bd300595fc4df 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();
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698