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

Issue 2762893002: Fix a lifetime issue in ToolbarActionsBarBubbleViews (Closed)

Created:
3 years, 9 months ago by tapted
Modified:
3 years, 9 months ago
Reviewers:
Finnur
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, tfarina, extensions-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a lifetime issue in ToolbarActionsBarBubbleViews. Also re-enable ExtensionMessageBubbleViewBrowserTest.TestClickingLearnMoreButton on Mac, which tickled it, and add more coverage. The test was disabled on Mac in r457730, but the crash reporter has matching stacks recorded on Windows - see http://crbug.com/702554#c6. The problem is that clicking a button would trigger an asynchronous Widget::Close() after setting the view's delegate to null. But OS events can still arrive while waiting for the asynchronous Close() to complete, and cause a segfault. To fix, don't clear the view's delegate: just set state to ensure the correct close reason is forwarded to it when the dialog is closed via the usual codepaths. BUG=702554 Review-Url: https://codereview.chromium.org/2762893002 Cr-Commit-Position: refs/heads/master@{#459382} Committed: https://chromium.googlesource.com/chromium/src/+/b9fc45d0bb0654521d098aae19e73925e79ac270

Patch Set 1 : Option 1 #

Patch Set 2 : Option 2 #

Patch Set 3 : Update comment #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -16 lines) Patch
M chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc View 1 2 3 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc View 1 4 chunks +4 lines, -8 lines 2 comments Download

Messages

Total messages: 20 (13 generated)
tapted
Hi Finnur, please take a look
3 years, 9 months ago (2017-03-21 04:10:44 UTC) #9
tapted
finnur: ping?
3 years, 9 months ago (2017-03-22 10:07:10 UTC) #12
Finnur
Sorry, I overlooked this yesterday. Thanks for fixing. One question: https://codereview.chromium.org/2762893002/diff/40001/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc File chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc (right): https://codereview.chromium.org/2762893002/diff/40001/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc#newcode164 ...
3 years, 9 months ago (2017-03-22 10:56:04 UTC) #13
tapted
https://codereview.chromium.org/2762893002/diff/40001/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc File chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc (right): https://codereview.chromium.org/2762893002/diff/40001/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc#newcode164 chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc:164: close_reason_ = ToolbarActionsBarBubbleDelegate::CLOSE_LEARN_MORE; On 2017/03/22 10:56:04, Finnur wrote: > ...
3 years, 9 months ago (2017-03-23 00:07:06 UTC) #14
Finnur
Thanks. LGTM. And since you are OOO for the time being, I'll check the CQ ...
3 years, 9 months ago (2017-03-24 09:54:15 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2762893002/40001
3 years, 9 months ago (2017-03-24 09:54:41 UTC) #17
commit-bot: I haz the power
3 years, 9 months ago (2017-03-24 10:41:00 UTC) #20
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/b9fc45d0bb0654521d098aae19e7...

Powered by Google App Engine
This is Rietveld 408576698