From d05435167ac313733edfaccb89a7747f7dc6822c Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 5 Mar 2011 21:32:31 +0300 Subject: [PATCH] msxml3: Trace ref counts for all dom objects. --- dlls/msxml3/attribute.c | 8 +++++--- dlls/msxml3/cdata.c | 8 +++++--- dlls/msxml3/comment.c | 8 +++++--- dlls/msxml3/docfrag.c | 8 +++++--- dlls/msxml3/doctype.c | 6 ++---- dlls/msxml3/domimpl.c | 8 +++++--- dlls/msxml3/element.c | 4 ++-- dlls/msxml3/entityref.c | 8 +++++--- dlls/msxml3/nodelist.c | 8 +++++--- dlls/msxml3/nodemap.c | 8 +++++--- dlls/msxml3/pi.c | 8 +++++--- dlls/msxml3/text.c | 8 +++++--- 12 files changed, 54 insertions(+), 36 deletions(-) diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c index a6196a120b3..f61428af181 100644 --- a/dlls/msxml3/attribute.c +++ b/dlls/msxml3/attribute.c @@ -89,16 +89,18 @@ static ULONG WINAPI domattr_AddRef( IXMLDOMAttribute *iface ) { domattr *This = impl_from_IXMLDOMAttribute( iface ); - return InterlockedIncrement( &This->ref ); + ULONG ref = InterlockedIncrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); + return ref; } static ULONG WINAPI domattr_Release( IXMLDOMAttribute *iface ) { domattr *This = impl_from_IXMLDOMAttribute( iface ); - ULONG ref; + ULONG ref = InterlockedDecrement( &This->ref ); - ref = InterlockedDecrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); if ( ref == 0 ) { destroy_xmlnode(&This->node); diff --git a/dlls/msxml3/cdata.c b/dlls/msxml3/cdata.c index cdcebb09d1b..f81cf2f3267 100644 --- a/dlls/msxml3/cdata.c +++ b/dlls/msxml3/cdata.c @@ -89,16 +89,18 @@ static ULONG WINAPI domcdata_AddRef( IXMLDOMCDATASection *iface ) { domcdata *This = impl_from_IXMLDOMCDATASection( iface ); - return InterlockedIncrement( &This->ref ); + ULONG ref = InterlockedIncrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); + return ref; } static ULONG WINAPI domcdata_Release( IXMLDOMCDATASection *iface ) { domcdata *This = impl_from_IXMLDOMCDATASection( iface ); - ULONG ref; + ULONG ref = InterlockedDecrement( &This->ref ); - ref = InterlockedDecrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); if ( ref == 0 ) { destroy_xmlnode(&This->node); diff --git a/dlls/msxml3/comment.c b/dlls/msxml3/comment.c index 433cca9935b..4c5f107a25d 100644 --- a/dlls/msxml3/comment.c +++ b/dlls/msxml3/comment.c @@ -89,16 +89,18 @@ static ULONG WINAPI domcomment_AddRef( IXMLDOMComment *iface ) { domcomment *This = impl_from_IXMLDOMComment( iface ); - return InterlockedIncrement( &This->ref ); + ULONG ref = InterlockedIncrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); + return ref; } static ULONG WINAPI domcomment_Release( IXMLDOMComment *iface ) { domcomment *This = impl_from_IXMLDOMComment( iface ); - ULONG ref; + ULONG ref = InterlockedDecrement( &This->ref ); - ref = InterlockedDecrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); if ( ref == 0 ) { destroy_xmlnode(&This->node); diff --git a/dlls/msxml3/docfrag.c b/dlls/msxml3/docfrag.c index 89b82a9ea6c..0c4193ad77f 100644 --- a/dlls/msxml3/docfrag.c +++ b/dlls/msxml3/docfrag.c @@ -88,16 +88,18 @@ static ULONG WINAPI domfrag_AddRef( IXMLDOMDocumentFragment *iface ) { domfrag *This = impl_from_IXMLDOMDocumentFragment( iface ); - return InterlockedIncrement( &This->ref ); + ULONG ref = InterlockedIncrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); + return ref; } static ULONG WINAPI domfrag_Release( IXMLDOMDocumentFragment *iface ) { domfrag *This = impl_from_IXMLDOMDocumentFragment( iface ); - ULONG ref; + ULONG ref = InterlockedDecrement( &This->ref ); - ref = InterlockedDecrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); if ( ref == 0 ) { destroy_xmlnode(&This->node); diff --git a/dlls/msxml3/doctype.c b/dlls/msxml3/doctype.c index 9ebe1f045f8..360d2a03145 100644 --- a/dlls/msxml3/doctype.c +++ b/dlls/msxml3/doctype.c @@ -91,9 +91,7 @@ static ULONG WINAPI domdoctype_AddRef( { domdoctype *This = impl_from_IXMLDOMDocumentType( iface ); LONG ref = InterlockedIncrement(&This->ref); - - TRACE("(%p) ref=%d\n", This, ref); - + TRACE("(%p)->(%d)\n", This, ref); return ref; } @@ -103,7 +101,7 @@ static ULONG WINAPI domdoctype_Release( domdoctype *This = impl_from_IXMLDOMDocumentType( iface ); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p)->(%d)\n", This, ref); if(!ref) { destroy_xmlnode(&This->node); diff --git a/dlls/msxml3/domimpl.c b/dlls/msxml3/domimpl.c index 54936bb4cad..9743cc6a295 100644 --- a/dlls/msxml3/domimpl.c +++ b/dlls/msxml3/domimpl.c @@ -83,16 +83,18 @@ static ULONG WINAPI dimimpl_AddRef( IXMLDOMImplementation *iface ) { domimpl *This = impl_from_IXMLDOMImplementation( iface ); - return InterlockedIncrement( &This->ref ); + ULONG ref = InterlockedIncrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); + return ref; } static ULONG WINAPI dimimpl_Release( IXMLDOMImplementation *iface ) { domimpl *This = impl_from_IXMLDOMImplementation( iface ); - ULONG ref; + ULONG ref = InterlockedDecrement( &This->ref ); - ref = InterlockedDecrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); if ( ref == 0 ) { heap_free( This ); diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c index 5559fd2726e..8d81f676c29 100644 --- a/dlls/msxml3/element.c +++ b/dlls/msxml3/element.c @@ -100,7 +100,7 @@ static ULONG WINAPI domelem_AddRef( domelem *This = impl_from_IXMLDOMElement( iface ); LONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p)->(%d)\n", This, ref); return ref; } @@ -111,7 +111,7 @@ static ULONG WINAPI domelem_Release( domelem *This = impl_from_IXMLDOMElement( iface ); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p)->(%d)\n", This, ref); if(!ref) { destroy_xmlnode(&This->node); diff --git a/dlls/msxml3/entityref.c b/dlls/msxml3/entityref.c index add4d8a543a..7ce85ede8b0 100644 --- a/dlls/msxml3/entityref.c +++ b/dlls/msxml3/entityref.c @@ -88,16 +88,18 @@ static ULONG WINAPI entityref_AddRef( IXMLDOMEntityReference *iface ) { entityref *This = impl_from_IXMLDOMEntityReference( iface ); - return InterlockedIncrement( &This->ref ); + ULONG ref = InterlockedIncrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); + return ref; } static ULONG WINAPI entityref_Release( IXMLDOMEntityReference *iface ) { entityref *This = impl_from_IXMLDOMEntityReference( iface ); - ULONG ref; + ULONG ref = InterlockedDecrement( &This->ref ); - ref = InterlockedDecrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); if ( ref == 0 ) { destroy_xmlnode(&This->node); diff --git a/dlls/msxml3/nodelist.c b/dlls/msxml3/nodelist.c index 749b17930ff..67bcd2ad25f 100644 --- a/dlls/msxml3/nodelist.c +++ b/dlls/msxml3/nodelist.c @@ -93,16 +93,18 @@ static ULONG WINAPI xmlnodelist_AddRef( IXMLDOMNodeList *iface ) { xmlnodelist *This = impl_from_IXMLDOMNodeList( iface ); - return InterlockedIncrement( &This->ref ); + ULONG ref = InterlockedIncrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); + return ref; } static ULONG WINAPI xmlnodelist_Release( IXMLDOMNodeList *iface ) { xmlnodelist *This = impl_from_IXMLDOMNodeList( iface ); - ULONG ref; + ULONG ref = InterlockedDecrement( &This->ref ); - ref = InterlockedDecrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); if ( ref == 0 ) { xmldoc_release( This->parent->doc ); diff --git a/dlls/msxml3/nodemap.c b/dlls/msxml3/nodemap.c index 7055da5128d..660eab6bf67 100644 --- a/dlls/msxml3/nodemap.c +++ b/dlls/msxml3/nodemap.c @@ -95,16 +95,18 @@ static ULONG WINAPI xmlnodemap_AddRef( IXMLDOMNamedNodeMap *iface ) { xmlnodemap *This = impl_from_IXMLDOMNamedNodeMap( iface ); - return InterlockedIncrement( &This->ref ); + ULONG ref = InterlockedIncrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); + return ref; } static ULONG WINAPI xmlnodemap_Release( IXMLDOMNamedNodeMap *iface ) { xmlnodemap *This = impl_from_IXMLDOMNamedNodeMap( iface ); - ULONG ref; + ULONG ref = InterlockedDecrement( &This->ref ); - ref = InterlockedDecrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); if ( ref == 0 ) { IXMLDOMNode_Release( This->node ); diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c index 335b58445d3..49a221d00a0 100644 --- a/dlls/msxml3/pi.c +++ b/dlls/msxml3/pi.c @@ -88,16 +88,18 @@ static ULONG WINAPI dom_pi_AddRef( IXMLDOMProcessingInstruction *iface ) { dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); - return InterlockedIncrement( &This->ref ); + ULONG ref = InterlockedIncrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); + return ref; } static ULONG WINAPI dom_pi_Release( IXMLDOMProcessingInstruction *iface ) { dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); - ULONG ref; + ULONG ref = InterlockedDecrement( &This->ref ); - ref = InterlockedDecrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); if ( ref == 0 ) { destroy_xmlnode(&This->node); diff --git a/dlls/msxml3/text.c b/dlls/msxml3/text.c index b17d1d408b5..3e3d3b2508e 100644 --- a/dlls/msxml3/text.c +++ b/dlls/msxml3/text.c @@ -90,16 +90,18 @@ static ULONG WINAPI domtext_AddRef( IXMLDOMText *iface ) { domtext *This = impl_from_IXMLDOMText( iface ); - return InterlockedIncrement( &This->ref ); + ULONG ref = InterlockedIncrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); + return ref; } static ULONG WINAPI domtext_Release( IXMLDOMText *iface ) { domtext *This = impl_from_IXMLDOMText( iface ); - ULONG ref; + ULONG ref = InterlockedDecrement( &This->ref ); - ref = InterlockedDecrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); if ( ref == 0 ) { destroy_xmlnode(&This->node);