Index: components/exo/shell_surface.cc |
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc |
index 83a78a9215b6dfa8a43de35e25cfa4e00fb3526b..bead01c79bf79d0f17595f3d45e8c123262f0a52 100644 |
--- a/components/exo/shell_surface.cc |
+++ b/components/exo/shell_surface.cc |
@@ -236,15 +236,6 @@ ShellSurface::ShellSurface(Surface* surface) |
ShellSurface::~ShellSurface() { |
DCHECK(!scoped_configure_); |
- ash::Shell::GetInstance()->activation_client()->RemoveObserver(this); |
- if (surface_) { |
- if (scale_ != 1.0) |
- surface_->window()->SetTransform(gfx::Transform()); |
- surface_->SetSurfaceDelegate(nullptr); |
- surface_->RemoveSurfaceObserver(this); |
- } |
- if (parent_) |
- parent_->RemoveObserver(this); |
if (resizer_) |
EndDrag(false /* revert */); |
if (widget_) { |
@@ -254,6 +245,15 @@ ShellSurface::~ShellSurface() { |
widget_->Hide(); |
widget_->CloseNow(); |
} |
+ ash::Shell::GetInstance()->activation_client()->RemoveObserver(this); |
+ if (parent_) |
+ parent_->RemoveObserver(this); |
+ if (surface_) { |
+ if (scale_ != 1.0) |
+ surface_->window()->SetTransform(gfx::Transform()); |
+ surface_->SetSurfaceDelegate(nullptr); |
+ surface_->RemoveSurfaceObserver(this); |
+ } |
} |
void ShellSurface::AcknowledgeConfigure(uint32_t serial) { |