зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1480245
, part 2 - Stop storing a copy of interface name in nsXPCWrappedJSClass. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D9644 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
e6326985f3
Коммит
d0b8c2be2e
|
@ -135,7 +135,6 @@ nsXPCWrappedJSClass::nsXPCWrappedJSClass(JSContext* cx, REFNSIID aIID,
|
|||
const nsXPTInterfaceInfo* aInfo)
|
||||
: mRuntime(nsXPConnect::GetRuntimeInstance()),
|
||||
mInfo(aInfo),
|
||||
mName(nullptr),
|
||||
mIID(aIID),
|
||||
mDescriptors(nullptr)
|
||||
{
|
||||
|
@ -175,10 +174,6 @@ nsXPCWrappedJSClass::~nsXPCWrappedJSClass()
|
|||
if (mRuntime) {
|
||||
mRuntime->GetWrappedJSClassMap()->Remove(this);
|
||||
}
|
||||
|
||||
if (mName) {
|
||||
free(mName);
|
||||
}
|
||||
}
|
||||
|
||||
JSObject*
|
||||
|
@ -1331,10 +1326,7 @@ pre_call_clean_up:
|
|||
const char*
|
||||
nsXPCWrappedJSClass::GetInterfaceName()
|
||||
{
|
||||
if (!mName) {
|
||||
mName = moz_xstrdup(mInfo->Name());
|
||||
}
|
||||
return mName;
|
||||
return mInfo->Name();
|
||||
}
|
||||
|
||||
static const JSClass XPCOutParamClass = {
|
||||
|
|
|
@ -1785,7 +1785,6 @@ private:
|
|||
private:
|
||||
XPCJSRuntime* mRuntime;
|
||||
const nsXPTInterfaceInfo* mInfo;
|
||||
char* mName;
|
||||
nsIID mIID;
|
||||
uint32_t* mDescriptors;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче