Commit d3f199e6 authored by OlivierLi's avatar OlivierLi Committed by Commit Bot

Reland "Inhibit hang watching during views::DesktopDragDropClientWin::StartDragAndDrop"

This is a reland of 40efa001

Original change's description:
> 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/+/2369253
> Reviewed-by: Robert 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}

Bug: 806174
Bug: 1120381
Change-Id: I43fbc7d2d1c1ea2200b8df214389cb40dd65c683
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2386198Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
Commit-Queue: Oliver Li <olivierli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803872}
parent 1d01cbaf
...@@ -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"
...@@ -68,6 +69,10 @@ int DesktopDragDropClientWin::StartDragAndDrop( ...@@ -68,6 +69,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