| Index: ash/common/shelf/wm_shelf.cc
|
| diff --git a/ash/common/shelf/wm_shelf.cc b/ash/common/shelf/wm_shelf.cc
|
| index ffa969a7951bb3b2b558d3940930246e965b9a2d..e439381929be6836869bb732665d2bf36d8c5d57 100644
|
| --- a/ash/common/shelf/wm_shelf.cc
|
| +++ b/ash/common/shelf/wm_shelf.cc
|
| @@ -166,6 +166,19 @@ int WmShelf::PrimaryAxisValue(int horizontal, int vertical) const {
|
| void WmShelf::SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide_behavior) {
|
| DCHECK(shelf_layout_manager_);
|
|
|
| + // Force a stack dump when this method is invoked too frequently.
|
| + // This block is here temporary to help investigate http://crbug.com/665093 .
|
| + constexpr int kAutoHideRepeatInterval = 10000;
|
| + constexpr int kMaxAutoHideChangesIn10Seconds = 100;
|
| + if ((base::TimeTicks::Now() - time_last_auto_hide_change_).InMilliseconds() <
|
| + kAutoHideRepeatInterval) {
|
| + if (++count_auto_hide_changes_ > kMaxAutoHideChangesIn10Seconds)
|
| + CHECK(false);
|
| + } else {
|
| + count_auto_hide_changes_ = 0;
|
| + }
|
| + time_last_auto_hide_change_ = base::TimeTicks::Now();
|
| +
|
| if (auto_hide_behavior_ == auto_hide_behavior)
|
| return;
|
|
|
|
|