Commit fb363ed3 authored by Xiaoqian Dai's avatar Xiaoqian Dai Committed by Commit Bot

Add TODO link to the display-id being invalid bug.

Bug: 1068018, 1131071
Change-Id: I4261a55eaf5ef4eae3e2ac6ff6402351a278836b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2429824Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Xiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810327}
parent 84ee9f79
...@@ -143,6 +143,11 @@ void DragWindowResizer::EndDragImpl() { ...@@ -143,6 +143,11 @@ void DragWindowResizer::EndDragImpl() {
// Adjust the size and position so that it doesn't exceed the size of work // Adjust the size and position so that it doesn't exceed the size of work
// area. // area.
display::Display dst_display; display::Display dst_display;
// TODO(crbug.com/1131071): It's possible that |dst_display_id| returned from
// CursorManager::GetDisplay().id() is an invalid display id thus
// |dst_display| may be invalid as well. This may cause crash later. To avoid
// crash, we early return here. However, |dst_display_id| should never be
// invalid.
if (!screen->GetDisplayWithDisplayId(dst_display_id, &dst_display)) if (!screen->GetDisplayWithDisplayId(dst_display_id, &dst_display))
return; return;
const gfx::Size& size = dst_display.work_area().size(); const gfx::Size& size = dst_display.work_area().size();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment