Bug 963192, part 1 - Smart pointerize XPCWrappedJSClass::mInfo. r=bholley

This commit is contained in:
Andrew McCreight 2014-01-30 11:20:41 -08:00
parent 77daaba4a8
commit acb5312bd5
2 changed files with 2 additions and 4 deletions

View File

@ -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;

View File

@ -2376,7 +2376,7 @@ private:
private:
XPCJSRuntime* mRuntime;
nsIInterfaceInfo* mInfo;
nsCOMPtr<nsIInterfaceInfo> mInfo;
char* mName;
nsIID mIID;
uint32_t* mDescriptors;