Commit 40efa001 authored by OlivierLi's avatar OlivierLi Committed by Commit Bot

Inhibit hang watching during views::DesktopDragDropClientWin::StartDragAndDrop

The nested loop process the native events but not the tasks which looks
like a hang if not inhibited.

Bug: 806174, 1120381
Change-Id: Ie298b16a4e0f8cdd6c4ba398d71a7fee02b9d46d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2369253Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
Commit-Queue: Robert Liao <robliao@chromium.org>
Commit-Queue: Oliver Li <olivierli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800626}
parent b121977b
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <memory> #include <memory>
#include "base/threading/hang_watcher.h"
#include "ui/base/dragdrop/drag_drop_types.h" #include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/drag_source_win.h" #include "ui/base/dragdrop/drag_source_win.h"
#include "ui/base/dragdrop/drop_target_event.h" #include "ui/base/dragdrop/drop_target_event.h"
...@@ -63,6 +64,10 @@ int DesktopDragDropClientWin::StartDragAndDrop( ...@@ -63,6 +64,10 @@ int DesktopDragDropClientWin::StartDragAndDrop(
DWORD effect; DWORD effect;
// Disable hang watching until the end of the function since the user can take
// unbounded time to complete the drag. (http://crbug.com/806174)
base::HangWatchScopeDisabled disabler;
HRESULT result = ::DoDragDrop( HRESULT result = ::DoDragDrop(
ui::OSExchangeDataProviderWin::GetIDataObject(*data.get()), ui::OSExchangeDataProviderWin::GetIDataObject(*data.get()),
drag_source_.Get(), drag_source_.Get(),
......
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