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

Issue 8816008: Remove aura::RootWindow instance from LayerAnimator::observers_ when the window is deleted (Closed)

Created:
9 years ago by Yusuke Sato
Modified:
9 years ago
CC:
chromium-reviews, dhollowa+watch_chromium.org, Paweł Hajdan Jr., sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

Remove aura::RootWindow instance from LayerAnimator::observers_ and LayerAnimationSequence::observers_ when the window is deleted. This would prevent Chrome from crashing (see the example stack trace below) when someone (e.g. ui/aura_shell/shell_accelerator_controller.cc) adds aura::RootWindow as an observer of a LayerAnimationSequence object, and the window is deleted before the animation finishes. pure virtual method called terminate called without an active exception [24029:24029:1206/172212:111412790729:ERROR:process_util_posix.cc(139)] Received signal 6         base::debug::StackTrace::StackTrace() [0x809fbf4]         base::(anonymous namespace)::StackDumpSignalHandler() [0x830b615] ...         ui::LayerAnimationSequence::NotifyAborted() [0x826fcce]         ui::LayerAnimationSequence::Abort() [0x826f95b]         ui::LayerAnimator::ClearAnimations() [0x8274f84]         ui::LayerAnimator::~LayerAnimator() [0x8273a74]         scoped_ptr<>::~scoped_ptr() [0x826c7e3]         ui::Layer::~Layer() [0x8269873]         scoped_ptr<>::~scoped_ptr() [0x81b7891]         aura::Window::~Window() [0x81b4745]         aura::RootWindow::~RootWindow() [0x81ae824]         aura::RootWindow::DeleteInstance() [0x81ace70] With the aura::RootWindow fix, we can reenable one test in shell_accelerator_controller_unittests.cc which checks the Control+Home accelerator. BUG=None TEST=ran aura_shell_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113762

Patch Set 1 : wip #

Patch Set 2 : review #

Patch Set 3 : rebase #

Total comments: 2

Patch Set 4 : review fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M ui/aura/root_window.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/aura_shell/shell_accelerator_controller_unittest.cc View 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Yusuke Sato
9 years ago (2011-12-08 08:37:49 UTC) #1
Ben Goodger (Google)
LGTM provided RemoveObserver is safe against removing an observer that was never registered. http://codereview.chromium.org/8816008/diff/4001/ui/aura/root_window.cc File ...
9 years ago (2011-12-08 17:14:16 UTC) #2
Yusuke Sato
http://codereview.chromium.org/8816008/diff/4001/ui/aura/root_window.cc File ui/aura/root_window.cc (right): http://codereview.chromium.org/8816008/diff/4001/ui/aura/root_window.cc#newcode437 ui/aura/root_window.cc:437: layer()->GetAnimator()->RemoveObserver(this); On 2011/12/08 17:14:17, Ben Goodger (Google) wrote: > ...
9 years ago (2011-12-09 01:50:59 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusukes@chromium.org/8816008/8001
9 years ago (2011-12-09 01:57:16 UTC) #4
commit-bot: I haz the power
Try job failure for 8816008-8001 (retry) on linux_clang for step "compile" (clobber build). It's a ...
9 years ago (2011-12-09 02:49:42 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusukes@chromium.org/8816008/8001
9 years ago (2011-12-09 03:44:02 UTC) #6
commit-bot: I haz the power
9 years ago (2011-12-09 04:56:20 UTC) #7
Change committed as 113762

Powered by Google App Engine
This is Rietveld 408576698