DescriptionFix a crash which occurs while dragging tabs back to the window where they originated from.
Reason for the crash is the recent change to the WebView::AttachWebContents function to show the
WebContentsView when the WCV's root window is NULL. This can happen if the tab was detached and
is being reattched in which case the clipping window is removed, etc.
The actual crash occurs in the RWHVA::WasShown function where we dereference a NULL host pointer
due to a NULL root window.
Fix is to show the WCV after the attach has happened in the holder. This works correctly and is required for the Legacy window to show up correctly.
I verified that WC::Show and WC::Hide only get called once and the same is true with RWHVA::WasShown/WasHidden.
I updated the TestWebViewAttachDetachWebContents webview unittest to check for a NULL root window
when WC::WasShown is fired and we test for the same.
BUG=415509
Committed: https://crrev.com/d9b817cc6c0f976cccbe31644726868ee5ac2bec
Cr-Commit-Position: refs/heads/master@{#296072}
Patch Set 1 #Patch Set 2 : Removed newlines #Patch Set 3 : Removed unused variable #
Total comments: 2
Patch Set 4 : Reverted changes to render_widget_host_view_aura.cc #
Total comments: 2
Patch Set 5 : Added comment #Messages
Total messages: 11 (2 generated)
|