Index: base/base_drop_target.cc |
=================================================================== |
--- base/base_drop_target.cc (revision 2626) |
+++ base/base_drop_target.cc (working copy) |
@@ -14,11 +14,13 @@ |
IDropTargetHelper* BaseDropTarget::cached_drop_target_helper_ = NULL; |
BaseDropTarget::BaseDropTarget(HWND hwnd) |
- : suspend_(false), |
- ref_count_(0), |
- hwnd_(hwnd) { |
+ : current_data_object_(), |
+ hwnd_(hwnd), |
+ suspend_(false), |
+ ref_count_(0) { |
DCHECK(hwnd); |
HRESULT result = RegisterDragDrop(hwnd, this); |
+ DCHECK(SUCCEEDED(result)); |
} |
BaseDropTarget::~BaseDropTarget() { |
@@ -130,9 +132,8 @@ |
ULONG BaseDropTarget::Release() { |
if (InterlockedDecrement(&ref_count_) == 0) { |
- ULONG copied_refcnt = ref_count_; |
delete this; |
- return copied_refcnt; |
+ return 0U; |
} |
return ref_count_; |
} |