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

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

Issue 8043029: Protect predictor_ shutdown in PrifileImplIoData::Handle destructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 8314f0d5d442c368e5ae1e60cfb79a5268b3cd67..b2ba615cb86229c9fe880a5f20cb63c0278c3028 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -56,12 +56,12 @@ ProfileImplIOData::Handle::~Handle() {
if (extensions_request_context_getter_)
extensions_request_context_getter_->CleanupOnUIThread();
- // TODO(rlp): Remove CHECKs once we have determined the cause for flakiness
- // during predictor shutdown. See http://crosbug.com/20407.
- CHECK(profile_ != NULL);
- PrefService* user_prefs = profile_->GetPrefs();
- CHECK(io_data_->predictor_.get() != NULL);
- io_data_->predictor_->ShutdownOnUIThread(user_prefs);
+ if (io_data_->predictor_.get() != NULL) {
+ // io_data_->predictor_ might be NULL if Init() was never called
+ // (i.e. we shut down before ProfileImpl::DoFinalInit() got called).
+ PrefService* user_prefs = profile_->GetPrefs();
+ io_data_->predictor_->ShutdownOnUIThread(user_prefs);
+ }
// Clean up all isolated app request contexts.
for (ChromeURLRequestContextGetterMap::iterator iter =
« 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