diff options
author | chron@chromium.org <chron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-02 23:35:20 +0000 |
---|---|---|
committer | chron@chromium.org <chron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-02 23:35:20 +0000 |
commit | 0023337b51004a44391856b64b138ba93a432ec3 (patch) | |
tree | 22de1a9a1916cb1e89e5dfcb7454cda8d6b6ccee | |
parent | c6e4bab5934b87488565ac54cb4a91da9a069bcd (diff) | |
download | chromium_src-0023337b51004a44391856b64b138ba93a432ec3.zip chromium_src-0023337b51004a44391856b64b138ba93a432ec3.tar.gz chromium_src-0023337b51004a44391856b64b138ba93a432ec3.tar.bz2 |
Fix for RenewAuthToken crash. Extend life of AuthWatcher.
TEST=Open and close browser repeatedly.
BUG=50955
Review URL: http://codereview.chromium.org/3034045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54633 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/sync/engine/syncapi.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index 41186a0..a895e73 100644 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -1583,7 +1583,6 @@ void SyncManager::SyncInternal::Shutdown() { // example, and cause initialization to continue, which is bad. if (auth_watcher_) { auth_watcher_->Shutdown(); - auth_watcher_ = NULL; authwatcher_hookup_.reset(); } @@ -1595,6 +1594,15 @@ void SyncManager::SyncInternal::Shutdown() { syncer_thread_ = NULL; } + // TODO(chron): Since the auth_watcher_ is held by the sync session state, + // we release the ref here after the syncer is deallocated. + // In reality the SyncerSessionState's pointer to the + // authwatcher should be ref counted, but for M6 we use this + // lower risk fix so it's deallocated on the original thread. + if (auth_watcher_) { + auth_watcher_ = NULL; + } + // Shutdown the xmpp buzz connection. if (talk_mediator.get()) { LOG(INFO) << "P2P: Mediator logout started."; |