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

Issue 2557593009: Fix Chrome crashes on calling OnTrayVisibilityChange (Closed)

Created:
4 years ago by yiyix
Modified:
4 years ago
CC:
chromium-reviews, kalyank, sadrul, tdanderson, oka
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix Chrome crashes on calling OnTrayVisibilityChange When status area widget is initialized in Chrome Book with stylus pen, StatusAreaWidget::CreateTrayViews will call AddPaletteTray() to initialize a |palette_tray_| (which controls the stylus pen) and update this tray's visibility. The problem is that the |logout_button_tray_| is not initialized yet (it's initialized after the |palette_tray_|) and is used in the visibility update function in |palette_tray_|. As a result, Chrome OS crashes on machine with a stylus pen only. This crash happened because the order of the tray initialization is changed in cl: https://codereview.chromium.org/2427313003 BUG=671293 Committed: https://crrev.com/e422d9c3ef94d97c426160937f9b7422987c7d18 Cr-Commit-Position: refs/heads/master@{#438840}

Patch Set 1 #

Total comments: 10

Patch Set 2 : address comments #

Total comments: 2

Patch Set 3 : address comments #

Total comments: 2

Patch Set 4 : address comments #

Total comments: 3

Patch Set 5 : new approach #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -7 lines) Patch
M ash/common/system/chromeos/palette/palette_tray.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M ash/common/system/chromeos/palette/palette_tray.cc View 1 2 3 4 2 chunks +9 lines, -7 lines 0 comments Download
M ash/common/system/status_area_widget.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (18 generated)
yiyix
@varkha, sadrul, could you please take a look at this change? Thank you.
4 years ago (2016-12-08 23:23:40 UTC) #7
varkha
https://codereview.chromium.org/2557593009/diff/1/ash/common/system/status_area_widget.cc File ash/common/system/status_area_widget.cc (right): https://codereview.chromium.org/2557593009/diff/1/ash/common/system/status_area_widget.cc#newcode157 ash/common/system/status_area_widget.cc:157: // added to prevent to access |tray| before its ...
4 years ago (2016-12-09 00:59:03 UTC) #8
varkha
4 years ago (2016-12-09 00:59:37 UTC) #9
yiyix
@varkha, sadrul, Could you take another look at this change? https://codereview.chromium.org/2557593009/diff/1/ash/common/system/status_area_widget.cc File ash/common/system/status_area_widget.cc (right): https://codereview.chromium.org/2557593009/diff/1/ash/common/system/status_area_widget.cc#newcode157 ...
4 years ago (2016-12-09 20:04:53 UTC) #10
sadrul
https://codereview.chromium.org/2557593009/diff/20001/ash/common/system/status_area_widget.cc File ash/common/system/status_area_widget.cc (right): https://codereview.chromium.org/2557593009/diff/20001/ash/common/system/status_area_widget.cc#newcode154 ash/common/system/status_area_widget.cc:154: // StatusAreaWidget may be |Shutdown| but still be accessed ...
4 years ago (2016-12-12 19:34:48 UTC) #11
sadrul
lgtm with the nits https://codereview.chromium.org/2557593009/diff/40001/ash/common/system/status_area_widget.cc File ash/common/system/status_area_widget.cc (right): https://codereview.chromium.org/2557593009/diff/40001/ash/common/system/status_area_widget.cc#newcode285 ash/common/system/status_area_widget.cc:285: if (!logout_button_tray_) { Don't need ...
4 years ago (2016-12-13 17:06:58 UTC) #13
yiyix
@sadrul, varkha, could you please take another look at this change? @dcastagna, feel free to ...
4 years ago (2016-12-13 17:10:38 UTC) #14
Daniele Castagna
In the CL description you mention "A new variable |is_initialized_|" but it probably got removed ...
4 years ago (2016-12-13 17:24:58 UTC) #16
varkha
https://codereview.chromium.org/2557593009/diff/60001/ash/common/system/tray/system_tray_unittest.cc File ash/common/system/tray/system_tray_unittest.cc (right): https://codereview.chromium.org/2557593009/diff/60001/ash/common/system/tray/system_tray_unittest.cc#newcode68 ash/common/system/tray/system_tray_unittest.cc:68: void ShutDownLogoutButtonTray(StatusAreaWidget* widget) { nit: I think we usually ...
4 years ago (2016-12-13 17:34:54 UTC) #17
Daniele Castagna
On 2016/12/13 at 17:10:38, yiyix wrote: > @sadrul, varkha, could you please take another look ...
4 years ago (2016-12-13 18:03:49 UTC) #18
yiyix
As I am finally able to reproduce and diagnose the issue. I changed my approach. ...
4 years ago (2016-12-14 23:05:12 UTC) #21
varkha
lgtm
4 years ago (2016-12-15 00:00:34 UTC) #26
yiyix
@dcastagna, thank you for testing this patch on a chrome book with stylus pen! It ...
4 years ago (2016-12-15 00:33:21 UTC) #27
sadrul
I think we should have a test. Maybe you can look at that after this ...
4 years ago (2016-12-15 16:06:21 UTC) #28
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/2557593009/80001
4 years ago (2016-12-15 16:07:21 UTC) #30
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-12-15 16:12:24 UTC) #33
commit-bot: I haz the power
4 years ago (2016-12-15 16:16:07 UTC) #35
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/e422d9c3ef94d97c426160937f9b7422987c7d18
Cr-Commit-Position: refs/heads/master@{#438840}

Powered by Google App Engine
This is Rietveld 408576698