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

Issue 1636183003: Fix crash in the HWNDMessageHandler::HandleMouseInputForCaption function. (Closed)

Created:
4 years, 11 months ago by ananta
Modified:
4 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix crash in the HWNDMessageHandler::HandleMouseInputForCaption function. Crash occurs because we are referencing a member variable left_button_down_on_caption_ after the DefWindowProc call for WM_NCLBUTTONDOWN, which could destroy the window and in turn the HWNDMessageHandler instance. Fix is to reset the left_button_down_on_caption_ member before the DefWindowProc call. BUG=581341 TEST=Covered by views_unittest WidgetTest.DestroyInSysCommandNCLButtonDownOnCaption Committed: https://crrev.com/a54e6c0cb503d67d3eb086f936bc0429825d0c3b Cr-Commit-Position: refs/heads/master@{#371892}

Patch Set 1 #

Patch Set 2 : Added views_unittest DestroyInSysCommandNCLButtonDownOnCaption, which verifies that we don't crash … #

Total comments: 4

Patch Set 3 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -4 lines) Patch
M ui/views/widget/widget_unittest.cc View 1 2 4 chunks +46 lines, -3 lines 0 comments Download
M ui/views/win/hwnd_message_handler.cc View 1 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 17 (9 generated)
ananta
4 years, 11 months ago (2016-01-27 01:54:30 UTC) #2
sky
LGTM
4 years, 11 months ago (2016-01-27 02:49:48 UTC) #3
ananta
On 2016/01/27 02:49:48, sky wrote: > LGTM Thanks. I added a views test. PTAL.
4 years, 11 months ago (2016-01-27 02:52:02 UTC) #6
sky
SLGTM https://codereview.chromium.org/1636183003/diff/20001/ui/views/widget/widget_unittest.cc File ui/views/widget/widget_unittest.cc (right): https://codereview.chromium.org/1636183003/diff/20001/ui/views/widget/widget_unittest.cc#newcode3268 ui/views/widget/widget_unittest.cc:3268: if (instance_->destroy_on_message_ && Is there a reason for ...
4 years, 11 months ago (2016-01-27 03:14:31 UTC) #7
ananta
https://codereview.chromium.org/1636183003/diff/20001/ui/views/widget/widget_unittest.cc File ui/views/widget/widget_unittest.cc (right): https://codereview.chromium.org/1636183003/diff/20001/ui/views/widget/widget_unittest.cc#newcode3268 ui/views/widget/widget_unittest.cc:3268: if (instance_->destroy_on_message_ && On 2016/01/27 03:14:30, sky wrote: > ...
4 years, 10 months ago (2016-01-27 21:23:31 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1636183003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1636183003/40001
4 years, 10 months ago (2016-01-27 21:36:37 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-01-27 22:19:49 UTC) #15
commit-bot: I haz the power
4 years, 10 months ago (2016-01-27 22:20:32 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/a54e6c0cb503d67d3eb086f936bc0429825d0c3b
Cr-Commit-Position: refs/heads/master@{#371892}

Powered by Google App Engine
This is Rietveld 408576698