Loading xpcom/glue/nsCOMPtr.h +6 −4 Original line number Diff line number Diff line Loading @@ -767,15 +767,17 @@ class nsCOMPtr MOZ_FINAL return temp; } template <typename I> void forget( T** rhs NS_OUTPARAM ) forget( I** rhs NS_OUTPARAM ) // Set the target of rhs to the value of mRawPtr and null out mRawPtr. // Useful to avoid unnecessary AddRef/Release pairs with "out" // parameters. // parameters where rhs bay be a T** or an I** where I is a base class // of T. { NS_ASSERTION(rhs, "Null pointer passed to forget!"); *rhs = 0; swap(*rhs); *rhs = get(); mRawPtr = 0; } T* Loading Loading
xpcom/glue/nsCOMPtr.h +6 −4 Original line number Diff line number Diff line Loading @@ -767,15 +767,17 @@ class nsCOMPtr MOZ_FINAL return temp; } template <typename I> void forget( T** rhs NS_OUTPARAM ) forget( I** rhs NS_OUTPARAM ) // Set the target of rhs to the value of mRawPtr and null out mRawPtr. // Useful to avoid unnecessary AddRef/Release pairs with "out" // parameters. // parameters where rhs bay be a T** or an I** where I is a base class // of T. { NS_ASSERTION(rhs, "Null pointer passed to forget!"); *rhs = 0; swap(*rhs); *rhs = get(); mRawPtr = 0; } T* Loading