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

Issue 2345373002: arc: Fix UpdatePinnedState crash (Closed)

Created:
4 years, 3 months ago by xiyuan
Modified:
4 years, 3 months ago
Reviewers:
yoshiki, zel
CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, yusukes+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

arc: Fix UpdatePinnedState crash Transient notifications get into a situation that the item is destroyed via mojo before its surface gets mapped via wayland. Check |item_| before UpdatePinnedState() call in SetSurface to fix the crash. BUG=647829 TBR=yoshiki@chromium.org Committed: https://crrev.com/17c00bdfe90fccf9192a6d0f54fd3441f1ced10c Cr-Commit-Position: refs/heads/master@{#419508}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M ui/arc/notification/arc_custom_notification_view.cc View 2 chunks +4 lines, -1 line 2 comments Download

Messages

Total messages: 17 (10 generated)
xiyuan
4 years, 3 months ago (2016-09-16 22:27:37 UTC) #2
zel
lgtm
4 years, 3 months ago (2016-09-19 16:36:55 UTC) #8
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/2345373002/1
4 years, 3 months ago (2016-09-19 17:32:22 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 3 months ago (2016-09-19 18:18:23 UTC) #13
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/17c00bdfe90fccf9192a6d0f54fd3441f1ced10c Cr-Commit-Position: refs/heads/master@{#419508}
4 years, 3 months ago (2016-09-19 18:21:19 UTC) #15
yoshiki
https://codereview.chromium.org/2345373002/diff/1/ui/arc/notification/arc_custom_notification_view.cc File ui/arc/notification/arc_custom_notification_view.cc (right): https://codereview.chromium.org/2345373002/diff/1/ui/arc/notification/arc_custom_notification_view.cc#newcode233 ui/arc/notification/arc_custom_notification_view.cc:233: if (item_) The patch itself lgtm, but why item ...
4 years, 3 months ago (2016-09-20 03:43:06 UTC) #16
xiyuan
4 years, 3 months ago (2016-09-20 15:58:16 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/2345373002/diff/1/ui/arc/notification/arc_cus...
File ui/arc/notification/arc_custom_notification_view.cc (right):

https://codereview.chromium.org/2345373002/diff/1/ui/arc/notification/arc_cus...
ui/arc/notification/arc_custom_notification_view.cc:233: if (item_)
On 2016/09/20 03:43:06, yoshiki wrote:
> The patch itself lgtm, but why item is null here?
> 
> It means surface is changed after OnItemDestroying, but isn't it weird?

There is a racing between ArcNotificationService and wayland on notification
close. |item_| is set to null when a notification is removed and mojo call is
made. However, the window closing is async.  Even though we close the window
before we do mojo call in ArcNotificationService. It is still possible that the
notification surface could exist and update via wayland for a short while. Hence
the crash.

Powered by Google App Engine
This is Rietveld 408576698