Fix a crash when a transient child is added to WindowPreviewView
When initializing a new widget such that its native window is added as a transient child of a window tracked by a WindowPreviewView, WindowPreviewView gets notified with this addition *before* the window is parented to a container. If we try to get its WindowState at this point we would crash at this line: https://cs.chromium.org/chromium/src/ash/wm/window_state.cc?rcl=110515d4d38fd48cb9c6a1d0d3e4f9abf7c415f4&l=820 This CL fixes this issue and adds a test that fails without the fix. BUG=1003544 TEST=Added a new test Change-Id: I794d312601eb5b80f1928e86ba0fa42911b8c327 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1826031 Commit-Queue: Ahmed Fakhry <afakhry@chromium.org> Reviewed-by:Mitsuru Oshima <oshima@chromium.org> Cr-Commit-Position: refs/heads/master@{#702112}
Showing
Please register or sign in to comment