Commit 1d9fadb6 authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

Mac: Add more checks to diagnose move loop crash

Despite the expectation that capture has been turned off when we enter a
move loop, traces show that when the mystery move loop crash happens,
capture is indeed on.

Let's see if:
- Releasing capture actually works
- Whether we're succesfully releasing capture on the widget entering the
move loop, but still have capture on another widget.

Bug: 876493
Change-Id: I22db7aca92d25df9e97fd57f9b005b45770191b5
Reviewed-on: https://chromium-review.googlesource.com/c/1329903Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607230}
parent 2d8ed7ee
...@@ -681,8 +681,10 @@ bool BridgedNativeWidgetImpl::HasCapture() { ...@@ -681,8 +681,10 @@ bool BridgedNativeWidgetImpl::HasCapture() {
} }
bool BridgedNativeWidgetImpl::RunMoveLoop(const gfx::Vector2d& drag_offset) { bool BridgedNativeWidgetImpl::RunMoveLoop(const gfx::Vector2d& drag_offset) {
DCHECK(!HasCapture());
// https://crbug.com/876493 // https://crbug.com/876493
CHECK(!HasCapture());
// Does some *other* widget have capture?
CHECK(!CocoaMouseCapture::GetGlobalCaptureWindow());
CHECK(!window_move_loop_); CHECK(!window_move_loop_);
// RunMoveLoop caller is responsible for updating the window to be under the // RunMoveLoop caller is responsible for updating the window to be under the
......
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