Index: ash/display/window_tree_host_manager.cc |
diff --git a/ash/display/window_tree_host_manager.cc b/ash/display/window_tree_host_manager.cc |
index fde5d13ed263fac56b0ab7bd45ad59229a9b06c9..7f11547024ddfca02b103ad16dc651528976d39b 100644 |
--- a/ash/display/window_tree_host_manager.cc |
+++ b/ash/display/window_tree_host_manager.cc |
@@ -813,7 +813,10 @@ AshWindowTreeHost* WindowTreeHostManager::AddWindowTreeHostForDisplay( |
params_with_bounds.initial_bounds = display_info.bounds_in_native(); |
params_with_bounds.offscreen = |
display.id() == display::DisplayManager::kUnifiedDisplayId; |
- AshWindowTreeHost* ash_host = AshWindowTreeHost::Create(params_with_bounds); |
+ // The AshWindowTreeHost ends up owned by the RootWindowControllers created |
+ // by this class. |
+ AshWindowTreeHost* ash_host = |
+ AshWindowTreeHost::Create(params_with_bounds).release(); |
aura::WindowTreeHost* host = ash_host->AsWindowTreeHost(); |
if (!input_method_) { // Singleton input method instance for Ash. |
input_method_ = ui::CreateInputMethod(this, host->GetAcceleratedWidget()); |