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

Issue 241243002: Changes layer reparenting to happen after a window parent is changed in aura::Window::AddChild (Closed)

Created:
6 years, 8 months ago by varkha
Modified:
6 years, 8 months ago
Reviewers:
sky
CC:
chromium-reviews, sadrul, ben+aura_chromium.org, kalyank
Visibility:
Public.

Description

Changes layer reparenting to happen after a window parent is changed in aura::Window::AddChild BUG=364498 TEST=Follow steps in the bug or at https://code.google.com/p/chromium/issues/detail?id=364517. Ensure no crash. TEST=aura_unittests --gtest_filter=WindowTest.RootWindowSetWhenReparenting This addresses a class of crashes that happen when layers bounds are updated while the code is in child->ReparentLayers inside Window::AddChild where the window is removed from its old parent but not yet added to the new parent. GetRootWindow would return NULL causing crashes in places where we assume that (Window::IsVisible() == (Window::GetRootWindow() != NULL)). There was a discussion about windows that are detached from the root - see here - https://codereview.chromium.org/82283002#msg12. It looks like the result of that discussion was that we should fix places where we assume that IsVisible() == (Window::GetRootWindow() != NULL). VideoDetector::MaybeNotifyObservers is one such place, NativeWidgetAura::IsMouseEventsEnabled() is another such place, there are probably many more. This CL tries to avoid this whole class of errors by restoring the sequence in AddChild that existed before https://codereview.chromium.org/82283002. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=265565

Patch Set 1 #

Patch Set 2 : Changes layer reparenting to happen after a window parent is changed in aura::Window::AddChild (tes… #

Patch Set 3 : Changes layer reparenting to happen after a window parent is changed (GetAncestorWithLayer timing) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -2 lines) Patch
M ui/aura/window.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M ui/aura/window_unittest.cc View 1 2 1 chunk +51 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
varkha
sky@, can you please comment on this? Can you think of anything that this change ...
6 years, 8 months ago (2014-04-17 18:10:20 UTC) #1
varkha
Those are two crashes that I have found so far that should be fixed with ...
6 years, 8 months ago (2014-04-17 18:14:00 UTC) #2
sky
This seems fine. But update your description (since it isn't a hack) and add test ...
6 years, 8 months ago (2014-04-17 21:56:49 UTC) #3
varkha
PTAL. I have added a test to verify that the root window is not lost ...
6 years, 8 months ago (2014-04-22 18:30:17 UTC) #4
sky
LGTM
6 years, 8 months ago (2014-04-22 19:43:23 UTC) #5
varkha
The CQ bit was checked by varkha@chromium.org
6 years, 8 months ago (2014-04-22 19:44:49 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varkha@chromium.org/241243002/20001
6 years, 8 months ago (2014-04-22 19:45:28 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-22 20:51:35 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_rel
6 years, 8 months ago (2014-04-22 20:51:36 UTC) #9
varkha
The CQ bit was checked by varkha@chromium.org
6 years, 8 months ago (2014-04-22 21:01:16 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varkha@chromium.org/241243002/20001
6 years, 8 months ago (2014-04-22 21:04:41 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-22 21:10:02 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_x64_rel
6 years, 8 months ago (2014-04-22 21:10:02 UTC) #13
varkha
The CQ bit was checked by varkha@chromium.org
6 years, 8 months ago (2014-04-22 21:11:00 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varkha@chromium.org/241243002/20001
6 years, 8 months ago (2014-04-22 21:11:39 UTC) #15
varkha
The CQ bit was unchecked by varkha@chromium.org
6 years, 8 months ago (2014-04-22 23:43:43 UTC) #16
varkha
sky@, could you please look at this again? I thought it would be more correct ...
6 years, 8 months ago (2014-04-23 02:47:03 UTC) #17
sky
Did you upload a new patchset?
6 years, 8 months ago (2014-04-23 02:55:13 UTC) #18
varkha
On 2014/04/23 02:55:13, sky wrote: > Did you upload a new patchset? Yes I did. ...
6 years, 8 months ago (2014-04-23 03:24:15 UTC) #19
sky
SLGTM
6 years, 8 months ago (2014-04-23 04:55:25 UTC) #20
varkha
The CQ bit was checked by varkha@chromium.org
6 years, 8 months ago (2014-04-23 05:05:07 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varkha@chromium.org/241243002/40001
6 years, 8 months ago (2014-04-23 05:05:34 UTC) #22
commit-bot: I haz the power
6 years, 8 months ago (2014-04-23 08:09:13 UTC) #23
Message was sent while issue was closed.
Change committed as 265565

Powered by Google App Engine
This is Rietveld 408576698