Commit 974b58c8 authored by David Black's avatar David Black Committed by Commit Bot

Don't attempt to cast holding space item view during destruction.

When `OnViewIsDeleting` is called, the holding space item view is
already well into its destruction sequence. We shouldn't attempt to cast
from `views::View` back to `HoldingSpaceItemView` at this time and we
have no need to.

Bug: 1137461
Change-Id: I3c431af03b692d15b4e83de25d9ffcaa2b35d148
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2472584Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: David Black <dmblack@google.com>
Cr-Commit-Position: refs/heads/master@{#817149}
parent fd3bbf88
......@@ -243,7 +243,7 @@ void HoldingSpaceItemViewDelegate::WriteDragDataForView(
}
void HoldingSpaceItemViewDelegate::OnViewIsDeleting(views::View* view) {
base::Erase(views_, HoldingSpaceItemView::Cast(view));
base::Erase(views_, view);
view_observer_.Remove(view);
}
......
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