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

Issue 10966023: Fix the crash that could occur when the window is closed while web contents drag is in progress. (Closed)

Created:
8 years, 3 months ago by jianli
Modified:
8 years, 2 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, dcheng
Visibility:
Public.

Description

Fix the crash that could occur when the window is closed while web contents drag is in progress. We now check if the contents view window is gone after system drag-and-drop returns. Bail out immediately if so. With this fix, we do not need the delay-close-at-drag workaround any more. This fix applies towards to both Windows and Aura. We do not have problem on GTK since it does not run nested message loop. On Mac, the system drag-and-drop is invoked from the Cocoa view that could outlive the WebContentsViewMac due to Cocoa retains count (see comment in WebContentsViewMac::~WebContentsViewMac). However, we do need to ensure that WebDragSource stops using web contents when it is gone. BUG=145363 TEST=Manual test by following the steps in the bug Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=159366

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fix typo per feedback #

Total comments: 2

Patch Set 3 : Patch to land #

Total comments: 1

Patch Set 4 : Patch to land #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -138 lines) Patch
M content/browser/web_contents/web_contents_drag_win.h View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_drag_win.cc View 1 9 chunks +70 lines, -26 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 2 chunks +0 lines, -10 lines 0 comments Download
M content/browser/web_contents/web_contents_view_android.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_view_android.cc View 1 2 3 1 chunk +0 lines, -9 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.h View 1 2 3 2 chunks +0 lines, -6 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.cc View 1 2 3 8 chunks +41 lines, -24 lines 0 comments Download
M content/browser/web_contents/web_contents_view_gtk.h View 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_view_gtk.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M content/browser/web_contents/web_contents_view_mac.h View 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_view_mac.mm View 2 chunks +1 line, -7 lines 0 comments Download
M content/browser/web_contents/web_contents_view_win.h View 2 chunks +0 lines, -9 lines 0 comments Download
M content/browser/web_contents/web_contents_view_win.cc View 4 chunks +4 lines, -18 lines 0 comments Download
M content/browser/web_contents/web_drag_source_mac.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_drag_source_mac.mm View 3 chunks +9 lines, -0 lines 0 comments Download
M content/public/browser/web_contents_view.h View 1 chunk +0 lines, -6 lines 0 comments Download
M content/test/test_web_contents_view.h View 1 chunk +0 lines, -2 lines 0 comments Download
M content/test/test_web_contents_view.cc View 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
jianli
Ben, could you please review both Windows and Aura changes? Tony, could you please review ...
8 years, 3 months ago (2012-09-20 23:54:22 UTC) #1
tony
Avi would be a better Mac reviewer than me. http://codereview.chromium.org/10966023/diff/1/content/browser/web_contents/web_contents_drag_win.cc File content/browser/web_contents/web_contents_drag_win.cc (right): http://codereview.chromium.org/10966023/diff/1/content/browser/web_contents/web_contents_drag_win.cc#newcode209 content/browser/web_contents/web_contents_drag_win.cc:209: ...
8 years, 3 months ago (2012-09-21 21:11:11 UTC) #2
Ben Goodger (Google)
I am OK with this if tony (who I think wrote this stuff originally) is. ...
8 years, 2 months ago (2012-09-27 16:05:20 UTC) #3
tony
LGTM. It would be nice if we could come up with some way to test ...
8 years, 2 months ago (2012-09-27 20:41:04 UTC) #4
jianli
Avi or Jam, could one of you approve the patch as the content owner? Thanks.
8 years, 2 months ago (2012-09-28 17:52:52 UTC) #5
jam
On 2012/09/28 17:52:52, jianli wrote: > Avi or Jam, could one of you approve the ...
8 years, 2 months ago (2012-09-28 19:20:51 UTC) #6
jam
https://codereview.chromium.org/10966023/diff/16001/content/browser/web_contents/web_contents_view_aura.cc File content/browser/web_contents/web_contents_view_aura.cc (right): https://codereview.chromium.org/10966023/diff/16001/content/browser/web_contents/web_contents_view_aura.cc#newcode101 content/browser/web_contents/web_contents_view_aura.cc:101: if (content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED != type) nit: type != content::...
8 years, 2 months ago (2012-09-28 19:21:01 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jianli@chromium.org/10966023/12020
8 years, 2 months ago (2012-09-28 20:24:57 UTC) #8
commit-bot: I haz the power
8 years, 2 months ago (2012-09-28 23:55:25 UTC) #9
Change committed as 159366

Powered by Google App Engine
This is Rietveld 408576698