Bug 1444129, part 6 - Rename fields of XPTParamDescriptor. r=njn
MozReview-Commit-ID: 62OFcZ6s2kd
--- a/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp
@@ -294,17 +294,17 @@ xptiInterfaceEntry::GetInterfaceIndexFor
if(methodIndex >= mMethodBaseIndex +
mDescriptor->mNumMethods)
{
NS_ERROR("bad param");
return NS_ERROR_INVALID_ARG;
}
- const XPTTypeDescriptor *td = ¶m->type;
+ const XPTTypeDescriptor *td = ¶m->mType;
while (td->Tag() == TD_ARRAY) {
td = &mDescriptor->mAdditionalTypes[td->u.mArray.mAdditionalType];
}
if (td->Tag() != TD_INTERFACE_TYPE) {
NS_ERROR("not an interface");
return NS_ERROR_INVALID_ARG;
@@ -431,17 +431,17 @@ xptiInterfaceEntry::GetIIDForParamNoAllo
// this is a private helper
nsresult
xptiInterfaceEntry::GetTypeInArray(const nsXPTParamInfo* param,
uint16_t dimension,
const XPTTypeDescriptor** type)
{
NS_ASSERTION(IsFullyResolved(), "bad state");
- const XPTTypeDescriptor *td = ¶m->type;
+ const XPTTypeDescriptor *td = ¶m->mType;
const XPTTypeDescriptor *additional_types =
mDescriptor->mAdditionalTypes;
for (uint16_t i = 0; i < dimension; i++) {
if (td->Tag() != TD_ARRAY) {
NS_ERROR("bad dimension");
return NS_ERROR_INVALID_ARG;
}
@@ -475,17 +475,17 @@ xptiInterfaceEntry::GetTypeForParam(uint
const XPTTypeDescriptor *td;
if(dimension) {
nsresult rv = GetTypeInArray(param, dimension, &td);
if(NS_FAILED(rv))
return rv;
}
else
- td = ¶m->type;
+ td = ¶m->mType;
*type = nsXPTType(td->mPrefix);
return NS_OK;
}
nsresult
xptiInterfaceEntry::GetSizeIsArgNumberForParam(uint16_t methodIndex,
const nsXPTParamInfo* param,
@@ -509,17 +509,17 @@ xptiInterfaceEntry::GetSizeIsArgNumberFo
const XPTTypeDescriptor *td;
if(dimension) {
nsresult rv = GetTypeInArray(param, dimension, &td);
if(NS_FAILED(rv))
return rv;
}
else
- td = ¶m->type;
+ td = ¶m->mType;
// verify that this is a type that has size_is
switch (td->Tag()) {
case TD_ARRAY:
*argnum = td->u.mArray.mArgNum;
break;
case TD_PSTRING_SIZE_IS:
case TD_PWSTRING_SIZE_IS:
@@ -547,17 +547,17 @@ xptiInterfaceEntry::GetInterfaceIsArgNum
if(methodIndex >= mMethodBaseIndex +
mDescriptor->mNumMethods)
{
NS_ERROR("bad index");
return NS_ERROR_INVALID_ARG;
}
- const XPTTypeDescriptor *td = ¶m->type;
+ const XPTTypeDescriptor *td = ¶m->mType;
while (td->Tag() == TD_ARRAY) {
td = &mDescriptor->mAdditionalTypes[td->u.mArray.mAdditionalType];
}
if (td->Tag() != TD_INTERFACE_IS_TYPE) {
NS_ERROR("not an iid_is");
return NS_ERROR_INVALID_ARG;
--- a/xpcom/reflect/xptinfo/xptinfo.h
+++ b/xpcom/reflect/xptinfo/xptinfo.h
@@ -118,20 +118,20 @@ public:
class nsXPTParamInfo : public XPTParamDescriptor
{
// NO DATA - this a flyweight wrapper
public:
MOZ_IMPLICIT nsXPTParamInfo(const XPTParamDescriptor& desc)
{*(XPTParamDescriptor*)this = desc;}
- bool IsIn() const {return !!(flags & kInMask);}
- bool IsOut() const {return !!(flags & kOutMask);}
- bool IsRetval() const {return !!(flags & kRetvalMask);}
- bool IsShared() const {return !!(flags & kSharedMask);}
+ bool IsIn() const {return !!(mFlags & kInMask);}
+ bool IsOut() const {return !!(mFlags & kOutMask);}
+ bool IsRetval() const {return !!(mFlags & kRetvalMask);}
+ bool IsShared() const {return !!(mFlags & kSharedMask);}
// Dipper types are one of the more inscrutable aspects of xpidl. In a
// nutshell, dippers are empty container objects, created and passed by
// the caller, and filled by the callee. The callee receives a fully-
// formed object, and thus does not have to construct anything. But
// the object is functionally empty, and the callee is responsible for
// putting something useful inside of it.
//
@@ -140,19 +140,19 @@ public:
// limited to 4 string types.
//
// When a dipper type is declared as an 'out' parameter, xpidl internally
// converts it to an 'in', and sets the XPT_PD_DIPPER flag on it. For this
// reason, dipper types are sometimes referred to as 'out parameters
// masquerading as in'. The burden of maintaining this illusion falls mostly
// on XPConnect, which creates the empty containers, and harvest the results
// after the call.
- bool IsDipper() const {return !!(flags & kDipperMask);}
- bool IsOptional() const {return !!(flags & kOptionalMask);}
- const nsXPTType GetType() const {return type.mPrefix;}
+ bool IsDipper() const {return !!(mFlags & kDipperMask);}
+ bool IsOptional() const {return !!(mFlags & kOptionalMask);}
+ const nsXPTType GetType() const {return mType.mPrefix;}
bool IsStringClass() const {
switch (GetType().TagPart()) {
case nsXPTType::T_ASTRING:
case nsXPTType::T_DOMSTRING:
case nsXPTType::T_UTF8STRING:
case nsXPTType::T_CSTRING:
return true;
--- a/xpcom/typelib/xpt/xpt_struct.cpp
+++ b/xpcom/typelib/xpt/xpt_struct.cpp
@@ -379,18 +379,18 @@ DoMethodDescriptor(XPTArena *arena, NotN
return true;
}
bool
DoParamDescriptor(XPTArena *arena, NotNull<XPTCursor*> cursor,
XPTParamDescriptor *pd, XPTInterfaceDescriptor *id)
{
- if (!XPT_Do8(cursor, &pd->flags) ||
- !DoTypeDescriptor(arena, cursor, &pd->type, id))
+ if (!XPT_Do8(cursor, &pd->mFlags) ||
+ !DoTypeDescriptor(arena, cursor, &pd->mType, id))
return false;
return true;
}
bool
DoTypeDescriptorPrefix(XPTArena *arena, NotNull<XPTCursor*> cursor,
XPTTypeDescriptorPrefix *tdp)
--- a/xpcom/typelib/xpt/xpt_struct.h
+++ b/xpcom/typelib/xpt/xpt_struct.h
@@ -252,18 +252,18 @@ struct XPTConstDescriptor {
union XPTConstValue mValue;
};
/*
* A ParamDescriptor is a variable-size record used to describe either a
* single argument to a method or a method's result.
*/
struct XPTParamDescriptor {
- uint8_t flags;
- XPTTypeDescriptor type;
+ uint8_t mFlags;
+ XPTTypeDescriptor mType;
};
/*
* A MethodDescriptor is a variable-size record used to describe a single
* interface method.
*/
struct XPTMethodDescriptor {
const char* name;