Back to index

lightning-sunbird  0.9+nobinonly
nsWeakReference.cpp File Reference
#include "nsWeakReference.h"
#include "nsCOMPtr.h"

Go to the source code of this file.


NS_COM_GLUE nsIWeakReferenceNS_GetWeakReference (nsISupports *aInstancePtr, nsresult *aErrorPtr)
 Deprecated, use |do_GetWeakReference| instead.

Function Documentation

NS_COM_GLUE nsIWeakReference* NS_GetWeakReference ( nsISupports *  aInstancePtr,
nsresult aErrorPtr 

Deprecated, use |do_GetWeakReference| instead.

Definition at line 64 of file nsWeakReference.cpp.

    nsresult status;

    nsIWeakReference* result = nsnull;

    if ( aInstancePtr )
        nsCOMPtr<nsISupportsWeakReference> factoryPtr = do_QueryInterface(aInstancePtr, &status);
        NS_ASSERTION(factoryPtr, "Oops!  You're asking for a weak reference to an object that doesn't support that.");
        if ( factoryPtr )
            status = factoryPtr->GetWeakReference(&result);
        // else, |status| has already been set by |do_QueryInterface|
      status = NS_ERROR_NULL_POINTER;

    if ( aErrorPtr )
      *aErrorPtr = status;
    return result;

Here is the call graph for this function:

Here is the caller graph for this function: