Chromium Code Reviews| Index: ui/aura/window_tree_host.cc |
| diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc |
| index 87fac84f1cfdfdd5241b829cdd23697b119055f6..4c5cd49161d0473f7c7cd3a8f038d006b6a901d1 100644 |
| --- a/ui/aura/window_tree_host.cc |
| +++ b/ui/aura/window_tree_host.cc |
| @@ -209,8 +209,11 @@ ui::EventDispatchDetails WindowTreeHost::DispatchKeyEventPostIME( |
| } |
| void WindowTreeHost::Show() { |
| - if (compositor()) |
| - compositor()->SetVisible(true); |
| + // Ensure that compositor has been properly initialized, see InitCompositor() |
| + // and InitHost(). |
| + CHECK(compositor()); |
|
sadrul
2016/12/06 16:10:54
DCHECK() should be fine here too.
|
| + DCHECK_EQ(compositor()->root_layer(), window()->layer()); |
| + compositor()->SetVisible(true); |
| ShowImpl(); |
| } |