| Index: ui/views/cocoa/drag_drop_client_mac.mm
|
| diff --git a/ui/views/cocoa/drag_drop_client_mac.mm b/ui/views/cocoa/drag_drop_client_mac.mm
|
| index 9dda333f01be43f1580fc022315501b8f7f162ef..d637f5d9e37ee98f47af4cd3853993224b3ca5e6 100644
|
| --- a/ui/views/cocoa/drag_drop_client_mac.mm
|
| +++ b/ui/views/cocoa/drag_drop_client_mac.mm
|
| @@ -148,11 +148,15 @@ NSDragOperation DragDropClientMac::DragUpdate(id<NSDraggingInfo> sender) {
|
| }
|
|
|
| NSDragOperation DragDropClientMac::Drop(id<NSDraggingInfo> sender) {
|
| - int drag_operation = drop_helper_.OnDrop(
|
| - *[data_source_ data], LocationInView([sender draggingLocation]),
|
| - operation_);
|
| + // OnDrop can optionally delete |this|, so clear data members first.
|
| + base::scoped_nsobject<CocoaDragDropDataProvider> data_source = data_source_;
|
| + int operation = operation_;
|
| data_source_.reset();
|
| operation_ = 0;
|
| +
|
| + int drag_operation = drop_helper_.OnDrop(
|
| + *[data_source data], LocationInView([sender draggingLocation]),
|
| + operation);
|
| return ui::DragDropTypes::DragOperationToNSDragOperation(drag_operation);
|
| }
|
|
|
|
|