diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-06 03:23:04 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-06 03:23:04 +0000 |
commit | 7f9f9cde120ef8431fdc6271cd17a4be0916203f (patch) | |
tree | dc7a8f11a76f9beeb8f77e2476818d72ce3cb3de | |
parent | 2c0879ab5383fdbb854f74e9890e33d1deefdc6a (diff) | |
download | chromium_src-7f9f9cde120ef8431fdc6271cd17a4be0916203f.zip chromium_src-7f9f9cde120ef8431fdc6271cd17a4be0916203f.tar.gz chromium_src-7f9f9cde120ef8431fdc6271cd17a4be0916203f.tar.bz2 |
Adds some debugging info in hopes of tracking leak in
bounds_animator/tab_strip.
BUG=40475
TEST=none
TBR=jcivelli@chromium.org
Review URL: http://codereview.chromium.org/1609008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43692 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/views/tabs/tab_strip.cc | 16 | ||||
-rwxr-xr-x | tools/valgrind/memcheck/suppressions.txt | 19 | ||||
-rw-r--r-- | views/animation/bounds_animator.cc | 11 |
3 files changed, 27 insertions, 19 deletions
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc index 373186e..19de279 100644 --- a/chrome/browser/views/tabs/tab_strip.cc +++ b/chrome/browser/views/tabs/tab_strip.cc @@ -13,6 +13,7 @@ #include "base/command_line.h" #include "base/compiler_specific.h" #include "base/stl_util-inl.h" +#include "base/string_util.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_theme_provider.h" #include "chrome/browser/defaults.h" @@ -1413,6 +1414,17 @@ void TabStrip::GenerateIdealBounds() { } void TabStrip::NewTabAnimation1Done() { +#if defined(OS_LINUX) + std::string details(IntToString(GetTabCount())); + + for (size_t i = 0; i < tab_data_.size(); ++i) { + if (tab_data_[i].tab->closing()) + details += " " + IntToString(static_cast<int>(i)); + } + + LOG(ERROR) << " NewTabAnimation1Done details=" << details; +#endif + int tab_data_index = static_cast<int>(tab_data_.size() - 1); Tab* tab = GetTabAtTabDataIndex(tab_data_index); @@ -1607,6 +1619,10 @@ void TabStrip::StopAnimating(bool layout) { } void TabStrip::ResetAnimationState(bool stop_new_tab_timer) { +#if defined(OS_LINUX) + LOG(ERROR) << " ResetAnimationState stop=" << stop_new_tab_timer; +#endif + if (animation_type_ == ANIMATION_NEW_TAB_2) newtab_button_->SchedulePaint(); diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt index 6219557..f5b497e 100755 --- a/tools/valgrind/memcheck/suppressions.txt +++ b/tools/valgrind/memcheck/suppressions.txt @@ -2635,25 +2635,6 @@ fun:_ZN11ProfileImpl14InitExtensionsEv } { - bug_40475 - Memcheck:Leak - fun:_Znw* - fun:_ZN8TabStrip20NewTabAnimation1DoneEv - fun:_Z16DispatchToMethodI8TabStripMS0_FvvEEvPT_T0_RK6Tuple0 - fun:_ZN4base9BaseTimerI8TabStripLb0EE9TimerTask3RunEv - fun:_ZN11MessageLoop7RunTaskEP4Task - fun:_ZN11MessageLoop21DeferOrRunPendingTaskERKNS_11PendingTaskE - fun:_ZN11MessageLoop13DoDelayedWorkEPN4base4TimeE - fun:_ZN4base16MessagePumpForUI17RunWithDispatcherEPNS_11MessagePump8DelegateEPNS0_10DispatcherE - fun:_ZN11MessageLoop11RunInternalEv - fun:_ZN11MessageLoop10RunHandlerEv - fun:_ZN16MessageLoopForUI3RunEPN4base16MessagePumpForUI10DispatcherE - fun:_ZN59_GLOBAL__N_chrome_browser_browser_main.cc_00000000_4D8C310C16RunUIMessageLoopEP14BrowserProcess - fun:_Z11BrowserMainRK18MainFunctionParams - fun:ChromeMain - fun:main -} -{ bug_40481 Memcheck:Leak fun:_Znw* diff --git a/views/animation/bounds_animator.cc b/views/animation/bounds_animator.cc index 65ba415..fc23e38 100644 --- a/views/animation/bounds_animator.cc +++ b/views/animation/bounds_animator.cc @@ -87,6 +87,13 @@ const SlideAnimation* BoundsAnimator::GetAnimationForView(View* view) { void BoundsAnimator::SetAnimationDelegate(View* view, AnimationDelegate* delegate, bool delete_when_done) { +#if defined(OS_LINUX) + if (!IsAnimating(view)) + LOG(ERROR) << "SetAnimationDelegate: not animating view"; + if (data_[view].delegate) + LOG(ERROR) << "SetAnimationDelegate: delegate already set: leaking"; +#endif + DCHECK(IsAnimating(view)); data_[view].delegate = delegate; data_[view].delete_delegate_when_done = delete_when_done; @@ -111,6 +118,10 @@ void BoundsAnimator::Cancel() { if (data_.empty()) return; +#if defined(OS_LINUX) + LOG(ERROR) << "Cancelling animations"; +#endif + while (!data_.empty()) data_.begin()->second.animation->Stop(); |