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

Issue 2703933002: Fix a crash due to reentrancy in the widget while processing a theme changed notification after com… (Closed)

Created:
3 years, 10 months ago by ananta
Modified:
3 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a crash due to reentrancy in the widget while processing a theme changed notification after coming out of fullscreen mode The crash occurs as views are removed/added while we are propagating theme changed notifications to the view hierarchy. Proposed fix is to add a recursion guard flag processing_theme_changed_ which is set in Widget::OnNativeThemeUpdated before propagating the theme changed notification and reset after the function returns. We check the flag in Widget::FrameTypeChanged() and bail. This function is called becaue Widget is registered as an observer on the BrowserView. BUG=681525 Review-Url: https://codereview.chromium.org/2703933002 Cr-Commit-Position: refs/heads/master@{#451505} Committed: https://chromium.googlesource.com/chromium/src/+/f7c7217dd882eac40d5d07e441db5ef9fe3c94a4

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use AutoReset #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -1 line) Patch
M ui/views/widget/widget.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/widget/widget.cc View 1 4 chunks +9 lines, -1 line 0 comments Download

Messages

Total messages: 20 (11 generated)
ananta
3 years, 10 months ago (2017-02-17 22:49:21 UTC) #2
sky
LGTM https://codereview.chromium.org/2703933002/diff/1/ui/views/widget/widget.cc File ui/views/widget/widget.cc (right): https://codereview.chromium.org/2703933002/diff/1/ui/views/widget/widget.cc#newcode1408 ui/views/widget/widget.cc:1408: processing_theme_changed_ = true; Use AutoReset.
3 years, 10 months ago (2017-02-17 22:50:03 UTC) #4
ananta
https://codereview.chromium.org/2703933002/diff/1/ui/views/widget/widget.cc File ui/views/widget/widget.cc (right): https://codereview.chromium.org/2703933002/diff/1/ui/views/widget/widget.cc#newcode1408 ui/views/widget/widget.cc:1408: processing_theme_changed_ = true; On 2017/02/17 22:50:03, sky wrote: > ...
3 years, 10 months ago (2017-02-17 22:55:04 UTC) #6
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/2703933002/20001
3 years, 10 months ago (2017-02-17 22:55:52 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_amd64-generic_chromium_compile_only_ng on ...
3 years, 10 months ago (2017-02-18 00:58:29 UTC) #11
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/2703933002/20001
3 years, 10 months ago (2017-02-18 01:17:26 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
3 years, 10 months ago (2017-02-18 03:19:33 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/2703933002/20001
3 years, 10 months ago (2017-02-19 00:39:00 UTC) #17
commit-bot: I haz the power
3 years, 10 months ago (2017-02-19 02:44:47 UTC) #20
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/f7c7217dd882eac40d5d07e441db...

Powered by Google App Engine
This is Rietveld 408576698