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

Unified Diff: content/browser/web_contents/web_contents_drag_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: Add initializer 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
Index: content/browser/web_contents/web_contents_drag_win.cc
diff --git a/content/browser/web_contents/web_contents_drag_win.cc b/content/browser/web_contents/web_contents_drag_win.cc
index f0cc0366254b893108e66a35023f51221fcd9b27..59c865b2e7063a61944c31012d0bd30815dc4e1d 100644
--- a/content/browser/web_contents/web_contents_drag_win.cc
+++ b/content/browser/web_contents/web_contents_drag_win.cc
@@ -361,12 +361,15 @@ bool WebContentsDragWin::DoDragging(const WebDropData& drop_data,
// if the contents view window is gone in the nested message loop invoked
// from DoDragDrop.
scoped_refptr<WebDragSource> retain_this(drag_source_);
+ drag_source_->set_data(&data);
+ data.SetInDragLoop(true);
MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
DoDragDrop(ui::OSExchangeDataProviderWin::GetIDataObject(data),
drag_source_,
WebDragOpMaskToWinDragOpMask(ops),
&effect);
+ drag_source_->set_data(NULL);
sky 2013/04/26 22:10:22 How do we know 'this' has been destroyed once the
dcheng 2013/04/26 22:20:10 Updated to the retained scoped_refptr on the stack
}
// Bail out immediately if the contents view window is gone.
« no previous file with comments | « no previous file | content/browser/web_contents/web_drag_source_win.h » ('j') | content/browser/web_contents/web_drag_source_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698