Back to index

lightning-sunbird  0.9+nobinonly
Functions
SizeTest03.cpp File Reference
#include "nsIDOMNode.h"
#include "nsCOMPtr.h"
#include "nsString.h"

Go to the source code of this file.

Functions

 NS_DEF_PTR (nsIDOMNode)
void Test03_raw (nsIDOMNode *aDOMNode, nsString *aResult)
void Test03_raw_optimized (nsIDOMNode *aDOMNode, nsString *aResult)
void Test03_nsCOMPtr (nsIDOMNode *aDOMNode, nsString *aResult)
void Test03_nsCOMPtr_optimized (nsIDOMNode *aDOMNode, nsString *aResult)

Function Documentation

void Test03_nsCOMPtr ( nsIDOMNode aDOMNode,
nsString aResult 
)

Definition at line 73 of file SizeTest03.cpp.

       {
//            if ( !aDOMNode || !aResult )
//                   return NS_ERROR_NULL_POINTER;

              nsCOMPtr<nsIDOMNode> parent;
              nsresult status = aDOMNode->GetParentNode( getter_AddRefs(parent) );
              if ( parent )
                     parent->GetNodeName(*aResult);

//            return status;
       }

Here is the call graph for this function:

void Test03_nsCOMPtr_optimized ( nsIDOMNode aDOMNode,
nsString aResult 
)

Definition at line 88 of file SizeTest03.cpp.

       {
//            if ( !aDOMNode || !aResult )
//                   return NS_ERROR_NULL_POINTER;

              nsIDOMNode* temp;
              nsresult status = aDOMNode->GetParentNode(&temp);
              nsCOMPtr<nsIDOMNode> parent( dont_AddRef(temp) );
              if ( parent )
                     parent->GetNodeName(*aResult);

//            return status;
       }

Here is the call graph for this function:

void Test03_raw ( nsIDOMNode aDOMNode,
nsString aResult 
)

Definition at line 29 of file SizeTest03.cpp.

       {
// -- the following code is assumed, but is commented out so we compare only
//             the relevent generated code

//            if ( !aDOMNode || !aResult )
//                   return NS_ERROR_NULL_POINTER;

              nsIDOMNode* parent = 0;
              nsresult status = aDOMNode->GetParentNode(&parent);
              
              if ( NS_SUCCEEDED(status) )
                     {
                            parent->GetNodeName(*aResult);
                     }

              NS_IF_RELEASE(parent);

//            return status;
       }
void Test03_raw_optimized ( nsIDOMNode aDOMNode,
nsString aResult 
)

Definition at line 53 of file SizeTest03.cpp.

       {
//            if ( !aDOMNode || !aResult )
//                   return NS_ERROR_NULL_POINTER;

              nsIDOMNode* parent;
              nsresult status = aDOMNode->GetParentNode(&parent);
              
              if ( NS_SUCCEEDED(status) )
                     {
                            parent->GetNodeName(*aResult);
                            NS_RELEASE(parent);
                     }

//            return status;
       }