You are right, this class seems like it needs some love (e.g. refactoring).
Note that this COM object is probably in a single apartment so it is single threaded. Note that it isn't specified in the class' comments. I don't know this class enough to give a definite answer. For the constructor, having a DCHECK(SUCCEEDED(result)); would be better. It is specified that the class user needs to call RevokeDragDrop, so it shouldn't be done in the destructor. I should be verified in the destructor with a DCHECK though. M-A 2008/9/24 Gaetano Mendola <[EMAIL PROTECTED]>: > > File base/base_drop_target.cc > > * members appear initialized in a different order than the .h > specification > * In BaseDropTarget::CTOR - the return value of RegisterDragDrop > is discarded > * In BaseDropTarget::DTOR - shouldn't be called RevokeDragDrop ? > * BaseDropTarget::Release - > Is the assignment ULONG copied_refcnt = > ref_count_; correct ? > Between the atomic decrement and the following > assignment there is a time window > in where ref_count can change. If the code is > correct better to add a comment for future > inspections. > > File base/base_drag_source.cc > > * BaseDragSource::Release - > Same comment about BadeDropTarget::Release > > > Regards > Gaetano Mendola > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Chromium-dev" group. To post to this group, send email to chromium-dev@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/chromium-dev?hl=en -~----------~----~----~----~------~----~------~--~---