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

Issue 23523018: Fixes use after free during drag and drop. (Closed)

Created:
7 years, 3 months ago by sky
Modified:
7 years, 3 months ago
CC:
chromium-reviews, tfarina, dcheng
Visibility:
Public.

Description

Fixes use after free during drag and drop. Apparently under windows requesting focus can trigger capture lost, which caused all sorts of problems with tab dragging. When you've dragged enough to initiate a real tab drag we save focus. The code never expected saving focus to trigger a capture lost (which stops tab dragging), which triggered the crash. The fix is to make the code allow for saving focus to delete the TabDragController. I'm also converting from storing a raw View* for the previously focused view to a ViewStorage id. This way if the previously focused view is deleted no crashes. I had to add a bit of infrastructure for the test. BUG=275931 TEST=covered by test now. R=ben@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221456

Patch Set 1 #

Patch Set 2 : Cleanup #

Patch Set 3 : Remove unused variable #

Patch Set 4 : Reupload #

Patch Set 5 : Merge 2 trunk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+251 lines, -59 lines) Patch
M chrome/browser/ui/views/frame/browser_frame.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_frame_aura.cc View 1 2 chunks +0 lines, -24 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_frame_win.cc View 1 chunk +0 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/frame/desktop_browser_frame_aura.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/frame/native_browser_frame.h View 1 chunk +0 lines, -5 lines 0 comments Download
A chrome/browser/ui/views/frame/native_browser_frame_factory.h View 1 chunk +36 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/frame/native_browser_frame_factory.cc View 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/frame/native_browser_frame_factory_aura.cc View 1 chunk +34 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/frame/native_browser_frame_factory_win.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller.h View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller.cc View 1 2 3 4 5 chunks +28 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc View 1 2 3 chunks +91 lines, -0 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
sky
7 years, 3 months ago (2013-09-03 23:44:00 UTC) #1
Ben Goodger (Google)
patch is malformed On Tue, Sep 3, 2013 at 4:44 PM, <sky@chromium.org> wrote: > Reviewers: ...
7 years, 3 months ago (2013-09-04 03:15:35 UTC) #2
sky
GAH! Try agian.
7 years, 3 months ago (2013-09-04 14:07:21 UTC) #3
Ben Goodger (Google)
lgtm
7 years, 3 months ago (2013-09-04 17:08:59 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/23523018/46001
7 years, 3 months ago (2013-09-04 17:15:39 UTC) #5
commit-bot: I haz the power
Failed to apply patch for chrome/browser/ui/views/tabs/tab_drag_controller.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 3 months ago (2013-09-04 17:15:49 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/23523018/2001
7 years, 3 months ago (2013-09-04 18:16:20 UTC) #7
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 3 months ago (2013-09-04 18:24:08 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/23523018/2001
7 years, 3 months ago (2013-09-05 15:32:36 UTC) #9
commit-bot: I haz the power
7 years, 3 months ago (2013-09-05 18:09:38 UTC) #10
Message was sent while issue was closed.
Change committed as 221456

Powered by Google App Engine
This is Rietveld 408576698