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

Issue 1863393006: MacViews: Fix MenuRunnerTests which fail with asan enabled. (Closed)

Created:
4 years, 8 months ago by karandeepb
Modified:
4 years, 8 months ago
Reviewers:
tapted, sky
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Fix MenuRunnerTests which fail with asan enabled. This CL fixes the following tests which fail due to use-after-free errors when asan is enabled - -MenuRunnerTest.AsynchronousKeyEventHandling -MenuRunnerTest.LatinMnemonic -MenuRunnerTest.NonLatinMnemonic These fail on the events dispatched by ui::test::EventGenerator. The reason for the failures is that the call to TerminateNestedMessageLoopIfNecessary() in MenuController::OnWillDispatchKeyEvent is unsafe, since the MenuController might by deleted by the calls to SelectByChar(..) or OnKeyDown(..). These failures are not experienced on platforms other than Mac, due to the differences in event processing pipelines. This CL fixes the tests by checking that the current MenuController instance is alive before calling TerminateNestedMessageLoopIfNecessary(). BUG=601315 Committed: https://crrev.com/aa336ae9f9b653825af2c70bdf59593fd58e886a Cr-Commit-Position: refs/heads/master@{#386323}

Patch Set 1 #

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

Messages

Total messages: 14 (8 generated)
karandeepb
PTAL Trent. As I said in the CL description, these tests don't fail on other ...
4 years, 8 months ago (2016-04-08 08:17:26 UTC) #5
karandeepb
PTAL sky@. I think that checking GetActiveInstance() before accessing member variables is safe only when ...
4 years, 8 months ago (2016-04-08 08:23:35 UTC) #7
sky
LGTM
4 years, 8 months ago (2016-04-08 16:21:06 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1863393006/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1863393006/1
4 years, 8 months ago (2016-04-11 00:22:53 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-04-11 01:20:46 UTC) #12
commit-bot: I haz the power
4 years, 8 months ago (2016-04-11 01:22:05 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/aa336ae9f9b653825af2c70bdf59593fd58e886a
Cr-Commit-Position: refs/heads/master@{#386323}

Powered by Google App Engine
This is Rietveld 408576698