Index: ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc |
index b42c5588f690932ca73ff3b5cbcfebe98703c4da..de99a8e57f9d8b351fb633ca6b72e013a4d33032 100644 |
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc |
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc |
@@ -96,6 +96,9 @@ DesktopWindowTreeHostWin::~DesktopWindowTreeHostWin() { |
// static |
aura::Window* DesktopWindowTreeHostWin::GetContentWindowForHWND(HWND hwnd) { |
+ // All HWND's we create should have WindowTreeHost instances associated with |
+ // them. There are exceptions like the content layer creating HWND's which |
+ // are not associated with WindowTreeHost instances. |
aura::WindowTreeHost* host = |
aura::WindowTreeHost::GetForAcceleratedWidget(hwnd); |
return host ? host->window()->GetProperty(kContentWindowForRootWindow) : NULL; |