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

Issue 1876013002: Fixed potential crash on destroying MenuRunnerImplCocoa. (Closed)

Created:
4 years, 8 months ago by kirr
Modified:
4 years, 8 months ago
Reviewers:
tapted, sadrul
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

Fixed potential crash on destroying MenuRunnerImplCocoa. "Use after free" could happen in MenuRunnerImplCocoa::RunMenu() if we cancel the menu and destroy it just after canceling (by calling MenuRunnerImplCocoa::Release()). In this case after the menu runloop finished we would check |delete_after_run_| flag that belongs to dead object and then could call the destructor for it a second time. BUG= Committed: https://crrev.com/2c0d33e61f10641ea1984bdc90461c1c439139af Cr-Commit-Position: refs/heads/master@{#387566}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Review fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -2 lines) Patch
M ui/views/controls/menu/menu_runner_cocoa_unittest.mm View 1 2 chunks +15 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_runner_impl_cocoa.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_runner_impl_cocoa.mm View 1 3 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (9 generated)
kirr
PTAL. Tests from CL sometimes causes a crash in current code, but works well with ...
4 years, 8 months ago (2016-04-11 09:53:34 UTC) #3
Andre
On 2016/04/11 09:53:34, kirr wrote: > PTAL. > > Tests from CL sometimes causes a ...
4 years, 8 months ago (2016-04-12 03:48:36 UTC) #4
sadrul
perhaps +tapted@ can review?
4 years, 8 months ago (2016-04-12 06:02:05 UTC) #7
tapted
https://codereview.chromium.org/1876013002/diff/1/ui/views/controls/menu/menu_runner_cocoa_unittest.mm File ui/views/controls/menu/menu_runner_cocoa_unittest.mm (right): https://codereview.chromium.org/1876013002/diff/1/ui/views/controls/menu/menu_runner_cocoa_unittest.mm#newcode165 ui/views/controls/menu/menu_runner_cocoa_unittest.mm:165: // in MenuRunnerImplCocoa::Release()). this comment is a bit hard ...
4 years, 8 months ago (2016-04-12 06:22:58 UTC) #8
kirr
On 2016/04/12 06:22:58, tapted wrote: > ui/views/controls/menu/menu_runner_cocoa_unittest.mm:165: // in > MenuRunnerImplCocoa::Release()). > this comment is ...
4 years, 8 months ago (2016-04-12 12:23:03 UTC) #9
tapted
lgtm, but you'll need an OWNER too just some CL description tweaks (sorry to nitpick): ...
4 years, 8 months ago (2016-04-13 02:45:30 UTC) #10
kirr
On 2016/04/13 02:45:30, tapted wrote: > lgtm, but you'll need an OWNER too sadrul@, could ...
4 years, 8 months ago (2016-04-13 07:04:26 UTC) #12
kirr
ping
4 years, 8 months ago (2016-04-14 16:51:09 UTC) #13
kirr
ping
4 years, 8 months ago (2016-04-14 16:51:11 UTC) #14
sadrul
lgtm
4 years, 8 months ago (2016-04-15 09:27:32 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1876013002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1876013002/20001
4 years, 8 months ago (2016-04-15 09:29:39 UTC) #17
commit-bot: I haz the power
Failed to apply the patch.
4 years, 8 months ago (2016-04-15 10:02:17 UTC) #19
commit-bot: I haz the power
4 years, 8 months ago (2016-04-15 10:04:01 UTC) #22
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/2c0d33e61f10641ea1984bdc90461c1c439139af
Cr-Commit-Position: refs/heads/master@{#387566}

Powered by Google App Engine
This is Rietveld 408576698