Fix crash when tab with media dragged to new window
Creating a new window for a tab playing media shows the medial toolbar button immediately. With a recent change, it would then attempt to get the window's BrowserView. But BrowserView::GetBrowserViewForBrowser() returns nullptr when called during BrowserView construction resulting in a crash. This CL changes MediaToolbarButtonView to take the BrowserView on construction instead. Fixed: 1130921, 1130897 Change-Id: Ica879fe9825c4ef1af2789169bffb49da28370b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2423551Reviewed-by:Abigail Klein <abigailbklein@google.com> Commit-Queue: Collin Baker <collinbaker@chromium.org> Cr-Commit-Position: refs/heads/master@{#809365}
Showing
Please register or sign in to comment