diff --git a/xpcom/base/nsWeakReference.cpp b/xpcom/base/nsWeakReference.cpp index d9c826eb3b22..ee84a3958e23 100644 --- a/xpcom/base/nsWeakReference.cpp +++ b/xpcom/base/nsWeakReference.cpp @@ -77,7 +77,7 @@ nsSupportsWeakReference::GetWeakReference( nsIWeakReference** aInstancePtr ) nsresult status; if ( !*aInstancePtr ) - status = NS_NOINTERFACE; + status = NS_ERROR_OUT_OF_MEMORY; else { NS_ADDREF(*aInstancePtr); diff --git a/xpcom/glue/nsWeakReference.cpp b/xpcom/glue/nsWeakReference.cpp index d9c826eb3b22..ee84a3958e23 100644 --- a/xpcom/glue/nsWeakReference.cpp +++ b/xpcom/glue/nsWeakReference.cpp @@ -77,7 +77,7 @@ nsSupportsWeakReference::GetWeakReference( nsIWeakReference** aInstancePtr ) nsresult status; if ( !*aInstancePtr ) - status = NS_NOINTERFACE; + status = NS_ERROR_OUT_OF_MEMORY; else { NS_ADDREF(*aInstancePtr);