Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(834)

Issue 584743004: Fix a crash which occurs while dragging tabs back to the window where they originated from. (Closed)

Created:
6 years, 3 months ago by ananta
Modified:
6 years, 3 months ago
Reviewers:
sky
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, tfarina, jam, penghuang+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -2 lines) Patch
M ui/views/controls/webview/webview.cc View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M ui/views/controls/webview/webview_unittest.cc View 1 2 5 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (2 generated)
ananta
6 years, 3 months ago (2014-09-19 18:48:54 UTC) #2
sky
https://codereview.chromium.org/584743004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/584743004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode588 content/browser/renderer_host/render_widget_host_view_aura.cc:588: if (GetNativeView()->GetHost()) { If this isn't true, when does ...
6 years, 3 months ago (2014-09-22 14:57:36 UTC) #3
ananta
https://codereview.chromium.org/584743004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/584743004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode588 content/browser/renderer_host/render_widget_host_view_aura.cc:588: if (GetNativeView()->GetHost()) { 4On 2014/09/22 14:57:36, sky wrote: > ...
6 years, 3 months ago (2014-09-22 15:12:18 UTC) #4
ananta
On 2014/09/22 15:12:18, ananta wrote: > https://codereview.chromium.org/584743004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc > File content/browser/renderer_host/render_widget_host_view_aura.cc (right): > > https://codereview.chromium.org/584743004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode588 > ...
6 years, 3 months ago (2014-09-22 18:50:36 UTC) #5
sky
LGTM https://codereview.chromium.org/584743004/diff/60001/ui/views/controls/webview/webview.cc File ui/views/controls/webview/webview.cc (right): https://codereview.chromium.org/584743004/diff/60001/ui/views/controls/webview/webview.cc#newcode306 ui/views/controls/webview/webview.cc:306: holder_->Attach(view_to_attach); As order is important, document why.
6 years, 3 months ago (2014-09-22 20:46:28 UTC) #6
ananta
https://codereview.chromium.org/584743004/diff/60001/ui/views/controls/webview/webview.cc File ui/views/controls/webview/webview.cc (right): https://codereview.chromium.org/584743004/diff/60001/ui/views/controls/webview/webview.cc#newcode306 ui/views/controls/webview/webview.cc:306: holder_->Attach(view_to_attach); On 2014/09/22 20:46:28, sky wrote: > As order ...
6 years, 3 months ago (2014-09-22 21:22:17 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/584743004/80001
6 years, 3 months ago (2014-09-22 21:25:02 UTC) #9
commit-bot: I haz the power
Committed patchset #5 (id:80001) as decc58e81902e5be1226f32850641185f4e3f53c
6 years, 3 months ago (2014-09-22 22:32:52 UTC) #10
commit-bot: I haz the power
6 years, 3 months ago (2014-09-22 22:33:23 UTC) #11
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/d9b817cc6c0f976cccbe31644726868ee5ac2bec
Cr-Commit-Position: refs/heads/master@{#296072}

Powered by Google App Engine
This is Rietveld 408576698