Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Issue 1609008: Adds some debugging info in hopes of tracking leak in (Closed)

Created:
10 years, 8 months ago by sky
Modified:
9 years, 7 months ago
Reviewers:
Jay Civelli
CC:
chromium-reviews, ben+cc_chromium.org, Timur Iskhodzhanov, stuartmorgan, pam+watch_chromium.org, Alexander Potapenko
Visibility:
Public.

Description

Adds some debugging info in hopes of tracking leak in bounds_animator/tab_strip. BUG=40475 TEST=none TBR=jcivelli@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=43692

Patch Set 1 #

Patch Set 2 : Removes supression #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -19 lines) Patch
M chrome/browser/views/tabs/tab_strip.cc View 3 chunks +16 lines, -0 lines 0 comments Download
M tools/valgrind/memcheck/suppressions.txt View 1 chunk +0 lines, -19 lines 0 comments Download
M views/animation/bounds_animator.cc View 2 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
sky
10 years, 8 months ago (2010-04-06 01:57:29 UTC) #1
jcivelli
10 years, 8 months ago (2010-04-06 16:15:29 UTC) #2
LGTM

On Mon, Apr 5, 2010 at 6:57 PM,  <sky@chromium.org> wrote:
> Reviewers: Jay Civelli,
>
> Description:
> Adds some debugging info in hopes of tracking leak in
> bounds_animator/tab_strip.
>
> BUG=40475
> TEST=none
> TBR=jcivelli@chromium.org
>
> Please review this at http://codereview.chromium.org/1609008
>
> Affected files:
>  M chrome/browser/views/tabs/tab_strip.cc
>  M views/animation/bounds_animator.cc
>
>
> Index: chrome/browser/views/tabs/tab_strip.cc
> diff --git a/chrome/browser/views/tabs/tab_strip.cc
> b/chrome/browser/views/tabs/tab_strip.cc
> index
>
373186e870e9b1c0affc59a8f5209da4d9013de7..19de279c4b6b57a544eb9c6209882e37df979f98
> 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();
>
> Index: views/animation/bounds_animator.cc
> diff --git a/views/animation/bounds_animator.cc
> b/views/animation/bounds_animator.cc
> index
>
65ba415082f3b19596363edbc1f183a545434923..fc23e3899984e22102fdb75cf7f18af55e7792b5
> 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();
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698