Bug 1611197, part 2 - Remove some dead XPCCallContext methods. r=nika

The fields these methods deal with are not dead: they are just
interacted with via other means.

I found these via the code coverage report for XPCInlines.h.

Differential Revision: https://phabricator.services.mozilla.com/D60863

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew McCreight 2020-01-23 17:33:19 +00:00
Родитель 1d3263daa5
Коммит aed4575d2d
2 изменённых файлов: 0 добавлений и 36 удалений

Просмотреть файл

@ -40,14 +40,6 @@ inline XPCCallContext* XPCCallContext::GetPrevCallContext() const {
return mPrevCallContext;
}
inline nsISupports* XPCCallContext::GetIdentityObject() const {
CHECK_STATE(HAVE_OBJECT);
if (mWrapper) {
return mWrapper->GetIdentityObject();
}
return nullptr;
}
inline XPCWrappedNative* XPCCallContext::GetWrapper() const {
if (mState == INIT_FAILED) {
return nullptr;
@ -57,11 +49,6 @@ inline XPCWrappedNative* XPCCallContext::GetWrapper() const {
return mWrapper;
}
inline XPCWrappedNativeProto* XPCCallContext::GetProto() const {
CHECK_STATE(HAVE_OBJECT);
return mWrapper ? mWrapper->GetProto() : nullptr;
}
inline bool XPCCallContext::CanGetTearOff() const {
return mState >= HAVE_OBJECT;
}
@ -76,8 +63,6 @@ inline nsIXPCScriptable* XPCCallContext::GetScriptable() const {
return mScriptable;
}
inline bool XPCCallContext::CanGetSet() const { return mState >= HAVE_NAME; }
inline XPCNativeSet* XPCCallContext::GetSet() const {
CHECK_STATE(HAVE_NAME);
return mSet;
@ -97,11 +82,6 @@ inline bool XPCCallContext::HasInterfaceAndMember() const {
return mState >= HAVE_NAME && mInterface && mMember;
}
inline jsid XPCCallContext::GetName() const {
CHECK_STATE(HAVE_NAME);
return mName;
}
inline bool XPCCallContext::GetStaticMemberIsLocal() const {
CHECK_STATE(HAVE_NAME);
return mStaticMemberIsLocal;
@ -117,11 +97,6 @@ inline JS::Value* XPCCallContext::GetArgv() const {
return mArgv;
}
inline JS::Value* XPCCallContext::GetRetVal() const {
CHECK_STATE(READY_TO_CALL);
return mRetVal;
}
inline void XPCCallContext::SetRetVal(const JS::Value& val) {
CHECK_STATE(HAVE_ARGS);
if (mRetVal) {
@ -155,11 +130,6 @@ inline uint16_t XPCCallContext::GetMethodIndex() const {
return mMethodIndex;
}
inline void XPCCallContext::SetMethodIndex(uint16_t index) {
CHECK_STATE(HAVE_OBJECT);
mMethodIndex = index;
}
/***************************************************************************/
inline XPCNativeInterface* XPCNativeMember::GetInterface() const {
XPCNativeMember* arrayStart =

Просмотреть файл

@ -686,28 +686,22 @@ class MOZ_STACK_CLASS XPCCallContext final {
inline XPCCallContext* GetPrevCallContext() const;
inline JSObject* GetFlattenedJSObject() const;
inline nsISupports* GetIdentityObject() const;
inline XPCWrappedNative* GetWrapper() const;
inline XPCWrappedNativeProto* GetProto() const;
inline bool CanGetTearOff() const;
inline XPCWrappedNativeTearOff* GetTearOff() const;
inline nsIXPCScriptable* GetScriptable() const;
inline bool CanGetSet() const;
inline XPCNativeSet* GetSet() const;
inline bool CanGetInterface() const;
inline XPCNativeInterface* GetInterface() const;
inline XPCNativeMember* GetMember() const;
inline bool HasInterfaceAndMember() const;
inline jsid GetName() const;
inline bool GetStaticMemberIsLocal() const;
inline unsigned GetArgc() const;
inline JS::Value* GetArgv() const;
inline JS::Value* GetRetVal() const;
inline uint16_t GetMethodIndex() const;
inline void SetMethodIndex(uint16_t index);
inline jsid GetResolveName() const;
inline jsid SetResolveName(JS::HandleId name);