| Index: ui/aura/desktop.cc
|
| diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc
|
| index 38818e69f46b9ae7776eb9f29d2b8a256da85d82..c3256f69738e816486d21ca6beb9e494b71efe79 100644
|
| --- a/ui/aura/desktop.cc
|
| +++ b/ui/aura/desktop.cc
|
| @@ -415,23 +415,21 @@ Desktop::Desktop()
|
| host_->SetDesktop(this);
|
| last_mouse_location_ = host_->QueryMouseLocation();
|
|
|
| - if (ui::Compositor::compositor_factory()) {
|
| - compositor_ = (*ui::Compositor::compositor_factory())(this);
|
| - } else {
|
| #ifdef USE_WEBKIT_COMPOSITOR
|
| - ui::CompositorCC::Initialize(false);
|
| + ui::CompositorCC::Initialize(false);
|
| #endif
|
| - compositor_ = ui::Compositor::Create(this, host_->GetAcceleratedWidget(),
|
| - host_->GetSize());
|
| - }
|
| + compositor_ = ui::Compositor::Create(this, host_->GetAcceleratedWidget(),
|
| + host_->GetSize());
|
| DCHECK(compositor_.get());
|
| }
|
|
|
| Desktop::~Desktop() {
|
| in_destructor_ = true;
|
| + // Make sure to NULL out the compositor before terminating so that state is
|
| + // cleared and we don't hit asserts.
|
| + compositor_ = NULL;
|
| #ifdef USE_WEBKIT_COMPOSITOR
|
| - if (!ui::Compositor::compositor_factory())
|
| - ui::CompositorCC::Terminate();
|
| + ui::CompositorCC::Terminate();
|
| #endif
|
| if (instance_ == this)
|
| instance_ = NULL;
|
|
|