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

Unified Diff: base/base_drop_target.cc

Issue 4273: Fix some issues found looking at the code. I have made two posts about it:... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 3 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 | « base/base_drag_source.cc ('k') | base/event_recorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
}
« no previous file with comments | « base/base_drag_source.cc ('k') | base/event_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698