diff options
author | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-03 17:47:13 +0000 |
---|---|---|
committer | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-03 17:47:13 +0000 |
commit | de34d1b62f7e63a83afc6253fce3c8f197bb2000 (patch) | |
tree | 2d7f1ecc2fdc465fe8d970923c37e9a662477ca7 /chrome/browser | |
parent | 22baf143d9211ec794f884ec5341481f950818ef (diff) | |
download | chromium_src-de34d1b62f7e63a83afc6253fce3c8f197bb2000.zip chromium_src-de34d1b62f7e63a83afc6253fce3c8f197bb2000.tar.gz chromium_src-de34d1b62f7e63a83afc6253fce3c8f197bb2000.tar.bz2 |
Fix attempt for bug 34158. Reset the TalkMediator after calling Logout to ensure it is destroyed from the
core thread. This ensures the task to destroy the GaiaAuth object is run on
the core thread and not the UI thread.
Fred and I debugged this together and actually saw a second crash appear to result
from this change, but then we did a clean build and were unable to repro that crash,
so I think this as a net win at the moment.
BUG=34158
Review URL: http://codereview.chromium.org/660437
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40521 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rwxr-xr-x | chrome/browser/sync/engine/syncapi.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index 938003e..966a34f 100755 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -953,7 +953,9 @@ class SyncManager::SyncInternal { initialized_(false) { } - ~SyncInternal() { } + ~SyncInternal() { + DCHECK(!talk_mediator_.get()); + } bool Init(const FilePath& database_location, const std::string& sync_server_and_path, @@ -1483,6 +1485,7 @@ void SyncManager::SyncInternal::Shutdown() { LOG(INFO) << "P2P: Mediator logout started."; if (talk_mediator()) { talk_mediator()->Logout(); + talk_mediator_.reset(); } LOG(INFO) << "P2P: Mediator logout completed."; |