diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 16:26:20 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 16:26:20 +0000 |
commit | ccfc1a7b70073eac2d1cf0ec4700e0fae725ea02 (patch) | |
tree | 3befa59fd3bd80cf9c60afcb7f28ba2beca1649e /chrome/browser/navigation_controller.cc | |
parent | b7b8f66bba2c9f8253096a92376dfd047b7d0822 (diff) | |
download | chromium_src-ccfc1a7b70073eac2d1cf0ec4700e0fae725ea02.zip chromium_src-ccfc1a7b70073eac2d1cf0ec4700e0fae725ea02.tar.gz chromium_src-ccfc1a7b70073eac2d1cf0ec4700e0fae725ea02.tar.bz2 |
Fixes two bugs in NavigationController:
. TabContentsWasDestroyed wasn't removing from the collector map,
resulting.
. The collector map wasn't cleared in Destroy when it should have
been.
This was the cause of random ui failures.
BUG=1324555
TEST=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/navigation_controller.cc')
-rw-r--r-- | chrome/browser/navigation_controller.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/chrome/browser/navigation_controller.cc b/chrome/browser/navigation_controller.cc index ef6e767..ac4392f 100644 --- a/chrome/browser/navigation_controller.cc +++ b/chrome/browser/navigation_controller.cc @@ -256,6 +256,8 @@ void NavigationController::Destroy() { DCHECK(i->second); i->second->Cancel(); } + tab_contents_collector_map_.clear(); + // Finally destroy all the tab contents. for (std::list<TabContents*>::iterator i = tabs_to_destroy.begin(); @@ -271,11 +273,7 @@ void NavigationController::TabContentsWasDestroyed(TabContentsType type) { tab_contents_map_.erase(i); // Make sure we cancel any collector for that TabContents. - TabContentsCollectorMap::iterator ci = tab_contents_collector_map_.find(type); - if (ci != tab_contents_collector_map_.end()) { - DCHECK(ci->second); - ci->second->Cancel(); - } + CancelTabContentsCollection(type); // If that was the last tab to be destroyed, delete ourselves. if (tab_contents_map_.empty()) |