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

Issue 1824993003: Fix MenuController Gesture Crash (Closed)

Created:
4 years, 9 months ago by jonross
Modified:
4 years, 9 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

MenuController::OnGestureEvent can lead to menu closures. If a MenuDelegate were to delete the controller this can lead to a use_after_free error. This change fixes that error, by setting the item_selected_by_touch_ flag before accepting taps. Which also correctly sets it for ExitMenuRun of async menus. TEST=MenuControllerTest.AsynchronousGestureDeletesController BUG=596688 Committed: https://crrev.com/0430b51ca87b2b8c0b7f076ee9834995f7cafaf7 Cr-Commit-Position: refs/heads/master@{#382862}

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -1 line) Patch
M ui/views/controls/menu/menu_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/menu/menu_controller_unittest.cc View 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (6 generated)
jonross
I've updated MenuController to address a use-after-free error. PTAL
4 years, 9 months ago (2016-03-23 00:26:43 UTC) #4
sky
LGTM
4 years, 9 months ago (2016-03-23 15:21:45 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1824993003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1824993003/20001
4 years, 9 months ago (2016-03-23 15:28:59 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:20001)
4 years, 9 months ago (2016-03-23 16:33:51 UTC) #9
commit-bot: I haz the power
4 years, 9 months ago (2016-03-23 16:35:17 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/0430b51ca87b2b8c0b7f076ee9834995f7cafaf7
Cr-Commit-Position: refs/heads/master@{#382862}

Powered by Google App Engine
This is Rietveld 408576698