DescriptionRevert of Only dispatch menu events if they have a valid target. (https://codereview.chromium.org/284903002/)
Reason for revert:
Made the asan bot red:
Direct leak of 664 byte(s) in 1 object(s) allocated from:
#0 0x4b7c7b in operator new(unsigned long) /usr/local/google/work/chromium/src/third_party/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:62
#1 0x5a4ffc in RunMenu ui/views/controls/menu/menu_controller_unittest.cc:158
#2 0x5a4ffc in views::MenuControllerTest_EventTargeter_Test::TestBody() ui/views/controls/menu/menu_controller_unittest.cc:218
#3 0xb2b838 in HandleExceptionsInMethodIfSupported\u003Ctesting::Test, void> testing/gtest/src/gtest.cc:2045
#4 0xb2b838 in testing::Test::Run() testing/gtest/src/gtest.cc:2061
#5 0xb2d2c8 in testing::TestInfo::Run() testing/gtest/src/gtest.cc:2237
#6 0xb2e006 in testing::TestCase::Run() testing/gtest/src/gtest.cc:2344
#7 0xb3e7fa in testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4065
#8 0xb3de40 in HandleExceptionsInMethodIfSupported\u003Ctesting::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2045
#9 0xb3de40 in testing::UnitTest::Run() testing/gtest/src/gtest.cc:3697
#10 0xafaee4 in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2231
#11 0xafaee4 in base::TestSuite::Run() base/test/test_suite.cc:206
#12 0xaf2656 in Run base/callback.h:401
#13 0xaf2656 in base::(anonymous namespace)::LaunchUnitTestsInternal(int, char**, base::Callback\u003Cint ()> const&, int) base/test/launcher/unit_test_launcher.cc:494
#14 0x83846a in main ui/views/run_all_unittests.cc:43
#15 0x7ff88421176c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226
Probably easy to fix (and thus easy to reland), but from skimming the test it's not obvious to me what's supposed to free controller_. I'm guessing the second block in the new test just needs an explicit delete? (An "Owned by X" comment close to controller_ would've helped me)
Original issue's description:
> Only dispatch menu events if they have a valid target.
>
> BUG=370162
> TEST=In touchview, open wrench menu and press a key (i.e. 'T'), nothing should happen.
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271283
TBR=sadrul@chromium.org,flackr@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=370162
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271306
Patch Set 1 #
Created: 6 years, 7 months ago
(Patch set is too large to download)
Messages
Total messages: 4 (0 generated)
|