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

Issue 1834823002: Fix MenuRunnerImpl Crash for context menu during drag-and-drop (Closed)

Created:
4 years, 9 months ago by jonross
Modified:
4 years, 8 months ago
Reviewers:
varkha, 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 MenuRunnerImpl Crash for context menu during drag-and-drop A user could cause a crash in release builds of chromium by dragging an extension from the toolbar into the app menu. Then while not releasing the dragged item, use arrow keys to select another extension icon. Then pressing right-click-menu key on a keyboard. This was because MenuRunner was not expecting nesting of MenuControllerDelegates within drag-ang-drop menus. This was not caught earlier as key handling in MenuController had a DCHECK to prevent key handling during drag-and-drop. This change addressed the crash in MenuRunnerImpl. Additionally both MenuController::OnKeyDown and MenuController::SelectByChar will exit instead of handling key events. We don't want a multi-model drag-and-drop / keyboard interaction model. TEST=MenuRunnerTest.NestingDuringDrag and manual testing BUG=597669 Committed: https://crrev.com/896fcf08e23a57d82ff9eeb003b7b875ecb17d2b Cr-Commit-Position: refs/heads/master@{#383717}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -2 lines) Patch
M ui/views/controls/menu/menu_controller.cc View 2 chunks +6 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_runner_impl.cc View 1 chunk +5 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_runner_unittest.cc View 1 chunk +26 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 8 (3 generated)
jonross
Hi Sky, This change fixes a crash in MenuRunnerImpl. I also remove MenuController key handling ...
4 years, 9 months ago (2016-03-24 21:25:38 UTC) #2
sky
LGTM
4 years, 9 months ago (2016-03-25 15:16:55 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1834823002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1834823002/1
4 years, 8 months ago (2016-03-29 13:47:13 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-03-29 14:25:28 UTC) #6
commit-bot: I haz the power
4 years, 8 months ago (2016-03-29 14:26:31 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/896fcf08e23a57d82ff9eeb003b7b875ecb17d2b
Cr-Commit-Position: refs/heads/master@{#383717}

Powered by Google App Engine
This is Rietveld 408576698