summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/engine
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 18:48:41 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 18:48:41 +0000
commitd76bbf097760840a476decbadfa389865d1f53a3 (patch)
treeb58cb25073b2275cc6b0915ec34dcf2a92f48bbd /chrome/browser/sync/engine
parenta9e25776c38cfad2445ed58eb3dc15189a4d6d66 (diff)
downloadchromium_src-d76bbf097760840a476decbadfa389865d1f53a3.zip
chromium_src-d76bbf097760840a476decbadfa389865d1f53a3.tar.gz
chromium_src-d76bbf097760840a476decbadfa389865d1f53a3.tar.bz2
sync: update comment @ syncapi shutdown monstrosity
BUG=78190 TEST=none Review URL: http://codereview.chromium.org/6760032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80498 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine')
-rw-r--r--chrome/browser/sync/engine/syncapi.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc
index 89a9ded..f26cf9a 100644
--- a/chrome/browser/sync/engine/syncapi.cc
+++ b/chrome/browser/sync/engine/syncapi.cc
@@ -2143,10 +2143,12 @@ void SyncManager::SyncInternal::Shutdown() {
sync_notifier_.reset();
}
- // Pump any messages the auth watcher, syncer thread, or talk
- // mediator posted before they shut down. (See OnSyncEngineEvent(),
- // and HandleTalkMediatorEvent() for the
- // events that may be posted.)
+ // |this| is about to be destroyed, so we have to ensure any messages
+ // that were posted to core_thread_ before or during syncer thread shutdown
+ // are flushed out, else they refer to garbage memory. SendNotification
+ // is an example.
+ // TODO(tim): Remove this monstrosity, perhaps with ObserverListTS once core
+ // thread is removed. Bug 78190.
{
CHECK(core_message_loop_);
bool old_state = core_message_loop_->NestableTasksAllowed();