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

Issue 8510076: Fix stale compositor references from ui::Layer (Closed)

Created:
9 years, 1 month ago by piman
Modified:
9 years, 1 month ago
Reviewers:
sky, jonathan.backer
CC:
chromium-reviews, jonathan.backer, Ian Vollick, tfarina, Paweł Hajdan Jr., piman+watch_chromium.org, dhollowa
Visibility:
Public.

Description

Fix stale compositor references from ui::Layer This is needed to fix some issues in tests exposed by the WebKit compositor. The problem is that sometimes during the teardown paths, some layers have stale a pointer to the compositor that has already been destroyed. The WebKit layer (rightfully) calls ScheduleDraw when the layer hierarchy is changed, exposing the issue. We now always walk back to the root layer to find the compositor, and reset the pointer when the compositor's root changes (or it gets destroyed). BUG=99524 TEST=views_unittest, aura_unittest, compositor_unittests with (and without) use_webkit_compositor=1 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110223

Patch Set 1 #

Total comments: 6

Patch Set 2 : Add tests, use GetRoot in GetCompositor #

Patch Set 3 : Reset root layer when destroyed #

Patch Set 4 : Fix linux_touch build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -38 lines) Patch
M ui/aura/window.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/compositor/compositor.h View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M ui/gfx/compositor/compositor.cc View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M ui/gfx/compositor/compositor_cc.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M ui/gfx/compositor/layer.h View 1 2 3 2 chunks +2 lines, -8 lines 0 comments Download
M ui/gfx/compositor/layer.cc View 1 2 3 5 chunks +19 lines, -12 lines 0 comments Download
M ui/gfx/compositor/layer_unittest.cc View 1 2 3 8 chunks +38 lines, -10 lines 0 comments Download
M views/view.cc View 1 chunk +1 line, -1 line 0 comments Download
M views/view_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M views/widget/native_widget_aura.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
piman
9 years, 1 month ago (2011-11-15 03:55:09 UTC) #1
sky
Is it possible to add tests for the case you're fixing? -Scott http://codereview.chromium.org/8510076/diff/1/ui/gfx/compositor/layer.cc File ui/gfx/compositor/layer.cc ...
9 years, 1 month ago (2011-11-15 04:57:04 UTC) #2
jonathan.backer
SGTM As an aside, are we finally in a place where we can have one ...
9 years, 1 month ago (2011-11-15 13:22:46 UTC) #3
sky
On Tue, Nov 15, 2011 at 5:22 AM, <backer@chromium.org> wrote: > SGTM > > As ...
9 years, 1 month ago (2011-11-15 16:41:38 UTC) #4
commit-bot: I haz the power
No LGTM from valid reviewers yet.
9 years, 1 month ago (2011-11-15 17:13:12 UTC) #5
piman
The bugs I'm fixing here were actually already found by existing tests, but I added ...
9 years, 1 month ago (2011-11-15 22:06:33 UTC) #6
sky
LGTM
9 years, 1 month ago (2011-11-15 22:08:08 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/8510076/5001
9 years, 1 month ago (2011-11-15 22:15:33 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/8510076/4004
9 years, 1 month ago (2011-11-15 22:38:07 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/8510076/6003
9 years, 1 month ago (2011-11-15 23:22:07 UTC) #10
commit-bot: I haz the power
9 years, 1 month ago (2011-11-16 00:51:57 UTC) #11
Change committed as 110223

Powered by Google App Engine
This is Rietveld 408576698