msxml3: Trace ref counts for all dom objects.

This commit is contained in:
Nikolay Sivov 2011-03-05 21:32:31 +03:00 committed by Alexandre Julliard
parent 46ae113e71
commit d05435167a
12 changed files with 54 additions and 36 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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 );

View File

@ -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);

View File

@ -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);

View File

@ -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 );

View File

@ -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 );

View File

@ -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);

View File

@ -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);