summaryrefslogtreecommitdiffstats
path: root/chromeos/cryptohome/async_method_caller.h
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-27 02:31:38 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-27 02:31:38 +0000
commit901864c2613bf8dd4afb5c8ba0b231b47938741a (patch)
tree86a2bc01a448edc92955d69fe44d314f7a6c0f1d /chromeos/cryptohome/async_method_caller.h
parent48c1ebd0b94eccee7c1e796506528c0f5334a4e6 (diff)
downloadchromium_src-901864c2613bf8dd4afb5c8ba0b231b47938741a.zip
chromium_src-901864c2613bf8dd4afb5c8ba0b231b47938741a.tar.gz
chromium_src-901864c2613bf8dd4afb5c8ba0b231b47938741a.tar.bz2
Fix deadlock between UI thread and drag and drop thread on Windows.
During a drag and drop operation, drop targets may call IDataObject::GetData() even though the drop is not yet complete. This is problematic for DownloadURL since calling GetData() on the stored CF_HDROP will actually trigger the download to start. In order to prevent this, it called GetKeyState() to check if the left mouse button was still down. Chrome depends on the fact that this check is reliable, as it calls GetData(CF_HDROP) to extract filenames when something is dragged over a WebDropTargetWin. However, this is not a reliable heuristic since the drag and drop loop doesn't run in the UI thread when there is a DownloadURL in the drag. If the heuristic fails, this results in a deadlock; the UI thread blocks in its call to GetData(CF_HDROP) while the drag and drop thread is blocked on the UI thread waiting for the download to complete. In order to fix this, DataObjectImpl now has a bool member to track whether the drag and drop operation is still in progress. On a successful drop, WebDragSourceWin indicates that the drag operation is complete prior to returning DRAGDROP_S_DROP. BUG=163387 Review URL: https://codereview.chromium.org/13979012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/cryptohome/async_method_caller.h')
0 files changed, 0 insertions, 0 deletions