diff --git a/js/xpconnect/src/XPCWrappedJSClass.cpp b/js/xpconnect/src/XPCWrappedJSClass.cpp index 21e7359a108..b6ea2a434a4 100644 --- a/js/xpconnect/src/XPCWrappedJSClass.cpp +++ b/js/xpconnect/src/XPCWrappedJSClass.cpp @@ -136,7 +136,6 @@ nsXPCWrappedJSClass::nsXPCWrappedJSClass(JSContext* cx, REFNSIID aIID, mIID(aIID), mDescriptors(nullptr) { - NS_ADDREF(mInfo); NS_ADDREF_THIS(); mRuntime->GetWrappedJSClassMap()->Add(this); @@ -177,7 +176,6 @@ nsXPCWrappedJSClass::~nsXPCWrappedJSClass() if (mName) nsMemory::Free(mName); - NS_IF_RELEASE(mInfo); } JSObject* @@ -1556,7 +1554,7 @@ nsXPCWrappedJSClass::DebugDump(int16_t depth) XPC_LOG_ALWAYS(("IID number is %s", iid ? iid : "invalid")); if (iid) NS_Free(iid); - XPC_LOG_ALWAYS(("InterfaceInfo @ %x", mInfo)); + XPC_LOG_ALWAYS(("InterfaceInfo @ %x", mInfo.get())); uint16_t methodCount = 0; if (depth) { uint16_t i; diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 67844cf57c3..07bdf5440bc 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -2376,7 +2376,7 @@ private: private: XPCJSRuntime* mRuntime; - nsIInterfaceInfo* mInfo; + nsCOMPtr mInfo; char* mName; nsIID mIID; uint32_t* mDescriptors;