[PATCH 3/6] Trace ref counts for all dom objects
Nikolay Sivov
nsivov at codeweavers.com
Sat Mar 5 12:32:31 CST 2011
---
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 a6196a1..f61428a 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 cdcebb0..f81cf2f 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 433cca9..4c5f107 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 89b82a9..0c4193a 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 9ebe1f0..360d2a0 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 54936bb..9743cc6 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 5559fd2..8d81f67 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 add4d8a..7ce85ed 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 749b179..67bcd2a 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 7055da5..660eab6 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 335b584..49a221d 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 b17d1d4..3e3d3b2 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);
--
1.5.6.5
--------------080108030206090901060904--
More information about the wine-patches
mailing list