Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1264)

Unified Diff: content/browser/web_contents/web_drag_source_win.cc

Issue 13979012: Fix deadlock between UI thread and drag and drop thread on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Retain Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_drag_source_win.h ('k') | ui/base/dragdrop/os_exchange_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_drag_source_win.cc
diff --git a/content/browser/web_contents/web_drag_source_win.cc b/content/browser/web_contents/web_drag_source_win.cc
index 18c18819da7ffdd4d85c4a5e9f853005dda425f5..03cdbf250348c4c4ef7109ab8d0fd74aad79cc71 100644
--- a/content/browser/web_contents/web_drag_source_win.cc
+++ b/content/browser/web_contents/web_drag_source_win.cc
@@ -11,6 +11,7 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents.h"
+#include "ui/base/dragdrop/os_exchange_data.h"
using WebKit::WebDragOperationNone;
@@ -36,7 +37,8 @@ WebDragSource::WebDragSource(gfx::NativeWindow source_wnd,
: ui::DragSourceWin(),
source_wnd_(source_wnd),
render_view_host_(web_contents->GetRenderViewHost()),
- effect_(DROPEFFECT_NONE) {
+ effect_(DROPEFFECT_NONE),
+ data_(NULL) {
registrar_.Add(this, NOTIFICATION_WEB_CONTENTS_SWAPPED,
Source<WebContents>(web_contents));
registrar_.Add(this, NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
@@ -67,6 +69,8 @@ void WebDragSource::OnDragSourceCancel() {
}
void WebDragSource::OnDragSourceDrop() {
+ DCHECK(data_);
+ data_->SetInDragLoop(false);
// On Windows, we check for drag end in IDropSource::QueryContinueDrag which
// happens before IDropTarget::Drop is called. HTML5 requires the "dragend"
// event to happen after the "drop" event. Since Windows calls these two
« no previous file with comments | « content/browser/web_contents/web_drag_source_win.h ('k') | ui/base/dragdrop/os_exchange_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698