Bug 1444129, part 4 - Rename the one field of XPTTypeDescriptorPrefix. r=njn
MozReview-Commit-ID: 4rO1xtMfHD6
--- a/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp
@@ -240,17 +240,17 @@ xptiInterfaceEntry::GetConstant(uint16_t
return NS_ERROR_INVALID_ARG;
}
const auto& c = mDescriptor->mConstDescriptors[index - mConstantBaseIndex];
AutoJSContext cx;
JS::Rooted<JS::Value> v(cx);
v.setUndefined();
- switch (c.type.prefix.flags) {
+ switch (c.type.prefix.mFlags) {
case nsXPTType::T_I16:
{
v.setInt32(c.value.i16);
break;
}
case nsXPTType::T_U16:
{
v.setInt32(c.value.ui16);
--- a/xpcom/reflect/xptinfo/xptinfo.h
+++ b/xpcom/reflect/xptinfo/xptinfo.h
@@ -23,33 +23,33 @@ public:
{} // random contents
MOZ_IMPLICIT nsXPTType(const XPTTypeDescriptorPrefix& prefix)
{*(XPTTypeDescriptorPrefix*)this = prefix;}
MOZ_IMPLICIT nsXPTType(const uint8_t& prefix)
{*(uint8_t*)this = prefix;}
nsXPTType& operator=(uint8_t val)
- {flags = val; return *this;}
+ {mFlags = val; return *this;}
nsXPTType& operator=(const nsXPTType& other)
- {flags = other.flags; return *this;}
+ {mFlags = other.mFlags; return *this;}
operator uint8_t() const
- {return flags;}
+ {return mFlags;}
// 'Arithmetic' here roughly means that the value is self-contained and
// doesn't depend on anything else in memory (ie: not a pointer, not an
// XPCOM object, not a jsval, etc).
//
// Supposedly this terminology comes from Harbison/Steele, but it's still
// a rather crappy name. We'd change it if it wasn't used all over the
// place in xptcall. :-(
bool IsArithmetic() const
- {return flags <= T_WCHAR;}
+ {return mFlags <= T_WCHAR;}
// We used to abuse 'pointer' flag bit in typelib format quite extensively.
// We've gotten rid of most of the cases, but there's still a fair amount
// of refactoring to be done in XPCWrappedJSClass before we can safely stop
// asking about this. In the mean time, we've got a temporary version of
// IsPointer() that should be equivalent to what's in the typelib.
bool deprecated_IsPointer() const
{return !IsArithmetic() && TagPart() != T_JSVAL;}
--- a/xpcom/typelib/xpt/xpt_struct.cpp
+++ b/xpcom/typelib/xpt/xpt_struct.cpp
@@ -390,17 +390,17 @@ DoParamDescriptor(XPTArena *arena, NotNu
return true;
}
bool
DoTypeDescriptorPrefix(XPTArena *arena, NotNull<XPTCursor*> cursor,
XPTTypeDescriptorPrefix *tdp)
{
- return XPT_Do8(cursor, &tdp->flags);
+ return XPT_Do8(cursor, &tdp->mFlags);
}
bool
DoTypeDescriptor(XPTArena *arena, NotNull<XPTCursor*> cursor,
XPTTypeDescriptor *td, XPTInterfaceDescriptor *id)
{
if (!DoTypeDescriptorPrefix(arena, cursor, &td->prefix)) {
return false;
--- a/xpcom/typelib/xpt/xpt_struct.h
+++ b/xpcom/typelib/xpt/xpt_struct.h
@@ -144,20 +144,20 @@ struct XPTInterfaceDescriptor {
* designates an InterfaceTypeDescriptor, while 19 represents an
* InterfaceIsTypeDescriptor.
*/
/* why bother with a struct? - other code relies on this being a struct */
struct XPTTypeDescriptorPrefix {
uint8_t TagPart() const {
static const uint8_t kFlagMask = 0xe0;
- return (uint8_t) (flags & ~kFlagMask);
+ return (uint8_t) (mFlags & ~kFlagMask);
}
- uint8_t flags;
+ uint8_t mFlags;
};
/*
* The following enum maps mnemonic names to the different numeric values
* of XPTTypeDescriptor->tag.
*/
enum XPTTypeDescriptorTags {
TD_INT8 = 0,