summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 21:51:55 +0000
committerzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 21:51:55 +0000
commit5471bc3e9d08d1d955c96a8193ee2d9638c1591a (patch)
tree0bec55837d3cad8d0497226c34b0f1b674859e7a /chrome
parent75aa495c44c3661779b36d2ec148ede3b256fb71 (diff)
downloadchromium_src-5471bc3e9d08d1d955c96a8193ee2d9638c1591a.zip
chromium_src-5471bc3e9d08d1d955c96a8193ee2d9638c1591a.tar.gz
chromium_src-5471bc3e9d08d1d955c96a8193ee2d9638c1591a.tar.bz2
[Sync] Extra checks to attempt to trace codepath in autofillchangeprocessor destruction crash.
BUG=61804 TEST=manual: make sure closing chrome while synced does not trigger check. Review URL: http://codereview.chromium.org/6679006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77867 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/sync/glue/autofill_data_type_controller.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc
index 92a61a1..7667c8f 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc
@@ -39,6 +39,12 @@ AutofillDataTypeController::AutofillDataTypeController(
AutofillDataTypeController::~AutofillDataTypeController() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+ // TODO(zea): remove once crbug.com/61804 is resolved.
+ CHECK_EQ(state_, NOT_RUNNING) << "AutofillDataTypeController destroyed "
+ << "without being stopped.";
+ CHECK(!change_processor_.get()) << "AutofillDataTypeController destroyed "
+ << "while holding a change processor.";
}
void AutofillDataTypeController::Start(StartCallback* start_callback) {
@@ -140,7 +146,12 @@ void AutofillDataTypeController::Stop() {
// particular, during shutdown we may attempt to destroy the
// profile_sync_service before we've removed its observers (BUG 61804).
datatype_stopped_.Wait();
+ } else if (change_processor_.get()) {
+ // TODO(zea): remove once crbug.com/61804 is resolved.
+ LOG(FATAL) << "AutofillDataTypeController::Stop() called after DB thread"
+ << " killed.";
}
+ CHECK(!change_processor_.get()) << "AutofillChangeProcessor not released.";
}
bool AutofillDataTypeController::enabled() {