Reset item containers when holding space bubble is reset
Holding space item views depend on HoldingSpaceItemViewDelegate owned by the HoldingSpaceTray. The delegate is reset with HoldingSpaceTrayBubble when the bubble is closed, which happens before the bubble widget gets torn down. Given that widget is destroyed asynchronously, there's a short time interval where holding space item container views are still around, but the delegate they depend on is destroyed - if a new item gets added at this time, it would cause usage of deleted delegate. (Found by tests added in CL:2493323). To prevent this, remove container views from holding space controller model and controller immediately when the HoldingSpaceTrayBubble gets reset. Change-Id: Icf5c523027ad352adff11ce9856a82bd93a7e4c5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2503628Reviewed-by:David Black <dmblack@google.com> Commit-Queue: Toni Baržić <tbarzic@chromium.org> Cr-Commit-Position: refs/heads/master@{#821361}
Showing
Please register or sign in to comment