зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1541684, part 2 - Remove nsXPCWrappedJSClass::mIID. r=nika
This is already stored on mInfo. Differential Revision: https://phabricator.services.mozilla.com/D26069 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c1d8f269ef
Коммит
a8dbd5d65f
|
@ -111,7 +111,7 @@ already_AddRefed<nsXPCWrappedJSClass> nsXPCWrappedJSClass::GetNewOrUsed(
|
||||||
const nsXPTInterfaceInfo* info = nsXPTInterfaceInfo::ByIID(aIID);
|
const nsXPTInterfaceInfo* info = nsXPTInterfaceInfo::ByIID(aIID);
|
||||||
if (info) {
|
if (info) {
|
||||||
if (!info->IsBuiltinClass() && nsXPConnect::IsISupportsDescendant(info)) {
|
if (!info->IsBuiltinClass() && nsXPConnect::IsISupportsDescendant(info)) {
|
||||||
clasp = new nsXPCWrappedJSClass(aIID, info);
|
clasp = new nsXPCWrappedJSClass(info);
|
||||||
if (!clasp->mDescriptors) {
|
if (!clasp->mDescriptors) {
|
||||||
clasp = nullptr;
|
clasp = nullptr;
|
||||||
}
|
}
|
||||||
|
@ -121,9 +121,8 @@ already_AddRefed<nsXPCWrappedJSClass> nsXPCWrappedJSClass::GetNewOrUsed(
|
||||||
return clasp.forget();
|
return clasp.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsXPCWrappedJSClass::nsXPCWrappedJSClass(REFNSIID aIID,
|
nsXPCWrappedJSClass::nsXPCWrappedJSClass(const nsXPTInterfaceInfo* aInfo)
|
||||||
const nsXPTInterfaceInfo* aInfo)
|
: mInfo(aInfo), mDescriptors(nullptr) {
|
||||||
: mInfo(aInfo), mIID(aIID), mDescriptors(nullptr) {
|
|
||||||
XPCJSRuntime::Get()->GetWrappedJSClassMap()->Add(this);
|
XPCJSRuntime::Get()->GetWrappedJSClassMap()->Add(this);
|
||||||
|
|
||||||
uint16_t methodCount = mInfo->MethodCount();
|
uint16_t methodCount = mInfo->MethodCount();
|
||||||
|
@ -1139,7 +1138,7 @@ nsXPCWrappedJSClass::DebugDump(int16_t depth) {
|
||||||
XPC_LOG_INDENT();
|
XPC_LOG_INDENT();
|
||||||
const char* name = mInfo->Name();
|
const char* name = mInfo->Name();
|
||||||
XPC_LOG_ALWAYS(("interface name is %s", name));
|
XPC_LOG_ALWAYS(("interface name is %s", name));
|
||||||
char* iid = mIID.ToString();
|
char* iid = mInfo->IID().ToString();
|
||||||
XPC_LOG_ALWAYS(("IID number is %s", iid ? iid : "invalid"));
|
XPC_LOG_ALWAYS(("IID number is %s", iid ? iid : "invalid"));
|
||||||
if (iid) {
|
if (iid) {
|
||||||
free(iid);
|
free(iid);
|
||||||
|
|
|
@ -1625,7 +1625,7 @@ class nsXPCWrappedJSClass final : public nsIXPCWrappedJSClass {
|
||||||
public:
|
public:
|
||||||
static already_AddRefed<nsXPCWrappedJSClass> GetNewOrUsed(REFNSIID aIID);
|
static already_AddRefed<nsXPCWrappedJSClass> GetNewOrUsed(REFNSIID aIID);
|
||||||
|
|
||||||
REFNSIID GetIID() const { return mIID; }
|
REFNSIID GetIID() const { return mInfo->IID(); }
|
||||||
const nsXPTInterfaceInfo* GetInterfaceInfo() const { return mInfo; }
|
const nsXPTInterfaceInfo* GetInterfaceInfo() const { return mInfo; }
|
||||||
const char* GetInterfaceName();
|
const char* GetInterfaceName();
|
||||||
|
|
||||||
|
@ -1654,7 +1654,7 @@ class nsXPCWrappedJSClass final : public nsIXPCWrappedJSClass {
|
||||||
virtual ~nsXPCWrappedJSClass();
|
virtual ~nsXPCWrappedJSClass();
|
||||||
|
|
||||||
nsXPCWrappedJSClass() = delete;
|
nsXPCWrappedJSClass() = delete;
|
||||||
nsXPCWrappedJSClass(REFNSIID aIID, const nsXPTInterfaceInfo* aInfo);
|
explicit nsXPCWrappedJSClass(const nsXPTInterfaceInfo* aInfo);
|
||||||
|
|
||||||
bool IsReflectable(uint16_t i) const {
|
bool IsReflectable(uint16_t i) const {
|
||||||
return (bool)(mDescriptors[i / 32] & (1U << (i % 32)));
|
return (bool)(mDescriptors[i / 32] & (1U << (i % 32)));
|
||||||
|
@ -1680,7 +1680,6 @@ class nsXPCWrappedJSClass final : public nsIXPCWrappedJSClass {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const nsXPTInterfaceInfo* mInfo;
|
const nsXPTInterfaceInfo* mInfo;
|
||||||
nsIID mIID;
|
|
||||||
uint32_t* mDescriptors;
|
uint32_t* mDescriptors;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче