From 1e513637f0b2485cdf190b6c2eb213e09cd37713 Mon Sep 17 00:00:00 2001 From: "dp%netscape.com" Date: Thu, 16 Sep 1999 19:20:18 +0000 Subject: [PATCH] NS_ADDREF() instead of calling it directly git-svn-id: svn://10.0.0.236/trunk@47805 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/libreg/xpcom/nsRegistry.cpp | 10 +++++----- mozilla/xpcom/components/nsRegistry.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mozilla/modules/libreg/xpcom/nsRegistry.cpp b/mozilla/modules/libreg/xpcom/nsRegistry.cpp index 9cde3fd21a7..654b97a26c9 100644 --- a/mozilla/modules/libreg/xpcom/nsRegistry.cpp +++ b/mozilla/modules/libreg/xpcom/nsRegistry.cpp @@ -839,7 +839,7 @@ NS_IMETHODIMP nsRegistry::EnumerateSubtrees( Key baseKey, nsIEnumerator **result // Check for success. if( *result ) { // Bump refcnt on behalf of caller. - (*result)->AddRef(); + NS_ADDREF(*result); } else { // Unable to allocate space for the enumerator object. rv = NS_ERROR_OUT_OF_MEMORY; @@ -862,7 +862,7 @@ NS_IMETHODIMP nsRegistry::EnumerateAllSubtrees( Key baseKey, nsIEnumerator **res // Check for success. if( *result ) { // Bump refcnt on behalf of caller. - (*result)->AddRef(); + NS_ADDREF(*result); } else { // Unable to allocate space for the enumerator object. rv = NS_ERROR_OUT_OF_MEMORY; @@ -939,7 +939,7 @@ NS_IMETHODIMP nsRegistry::EnumerateValues( Key baseKey, nsIEnumerator **result ) // Check for success. if( *result ) { // Bump refcnt on behalf of caller. - (*result)->AddRef(); + NS_ADDREF(*result); } else { // Unable to allocate space for the enumerator object. rv = NS_ERROR_OUT_OF_MEMORY; @@ -1101,7 +1101,7 @@ nsRegSubtreeEnumerator::CurrentItem( nsISupports **result) { if( result ) { *result = new nsRegistryNode( mReg, mName, (RKEY) mNext ); if( *result ) { - (*result)->AddRef(); + NS_ADDREF(*result); } else { rv = NS_ERROR_OUT_OF_MEMORY; } @@ -1141,7 +1141,7 @@ nsRegValueEnumerator::CurrentItem( nsISupports **result ) { if( result ) { *result = new nsRegistryValue( mReg, mKey, mEnum ); if( *result ) { - (*result)->AddRef(); + NS_ADDREF(*result); } else { rv = NS_ERROR_OUT_OF_MEMORY; } diff --git a/mozilla/xpcom/components/nsRegistry.cpp b/mozilla/xpcom/components/nsRegistry.cpp index 9cde3fd21a7..654b97a26c9 100644 --- a/mozilla/xpcom/components/nsRegistry.cpp +++ b/mozilla/xpcom/components/nsRegistry.cpp @@ -839,7 +839,7 @@ NS_IMETHODIMP nsRegistry::EnumerateSubtrees( Key baseKey, nsIEnumerator **result // Check for success. if( *result ) { // Bump refcnt on behalf of caller. - (*result)->AddRef(); + NS_ADDREF(*result); } else { // Unable to allocate space for the enumerator object. rv = NS_ERROR_OUT_OF_MEMORY; @@ -862,7 +862,7 @@ NS_IMETHODIMP nsRegistry::EnumerateAllSubtrees( Key baseKey, nsIEnumerator **res // Check for success. if( *result ) { // Bump refcnt on behalf of caller. - (*result)->AddRef(); + NS_ADDREF(*result); } else { // Unable to allocate space for the enumerator object. rv = NS_ERROR_OUT_OF_MEMORY; @@ -939,7 +939,7 @@ NS_IMETHODIMP nsRegistry::EnumerateValues( Key baseKey, nsIEnumerator **result ) // Check for success. if( *result ) { // Bump refcnt on behalf of caller. - (*result)->AddRef(); + NS_ADDREF(*result); } else { // Unable to allocate space for the enumerator object. rv = NS_ERROR_OUT_OF_MEMORY; @@ -1101,7 +1101,7 @@ nsRegSubtreeEnumerator::CurrentItem( nsISupports **result) { if( result ) { *result = new nsRegistryNode( mReg, mName, (RKEY) mNext ); if( *result ) { - (*result)->AddRef(); + NS_ADDREF(*result); } else { rv = NS_ERROR_OUT_OF_MEMORY; } @@ -1141,7 +1141,7 @@ nsRegValueEnumerator::CurrentItem( nsISupports **result ) { if( result ) { *result = new nsRegistryValue( mReg, mKey, mEnum ); if( *result ) { - (*result)->AddRef(); + NS_ADDREF(*result); } else { rv = NS_ERROR_OUT_OF_MEMORY; }