Chromium Code Reviews| 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. |