Commit ef8b4a6d authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Fix ShelfSpinnerController DCHECK controller is null when Finished

In crrev.com/c/1837323 |controller_| is set to null when an animation
starts.  The old DCHECK was never updated.  This CL updates it to
expect |controller_| to be null if the spinner is being removed from
UpdateApps() because the animation is Finished().

https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/ash/launcher/shelf_spinner_controller.cc;l=319-323;drc=c2c84a5ac7711dedcc0b7ff9e79bf7f2da019537

Bug: 1077722
Change-Id: Ie8d6b332c9cd869a7cc88dc58827e83e29e9e675
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2408595
Auto-Submit: Joel Hockey <joelhockey@chromium.org>
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Reviewed-by: default avatarNancy Wang <nancylingwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806519}
parent f2a745ea
...@@ -224,7 +224,9 @@ bool ShelfSpinnerController::RemoveSpinnerFromControllerMap( ...@@ -224,7 +224,9 @@ bool ShelfSpinnerController::RemoveSpinnerFromControllerMap(
const ash::ShelfID shelf_id(app_id); const ash::ShelfID shelf_id(app_id);
DCHECK_EQ(it->second.controller(), DCHECK_EQ(it->second.controller(),
owner_->shelf_model()->GetShelfItemDelegate(shelf_id)); it->second.IsFinished()
? nullptr
: owner_->shelf_model()->GetShelfItemDelegate(shelf_id));
app_controller_map_.erase(it); app_controller_map_.erase(it);
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment