Bug 1444129, part 4 - Rename the one field of XPTTypeDescriptorPrefix. r=njn
authorAndrew McCreight <continuation@gmail.com>
Wed, 07 Mar 2018 14:06:31 -0800
changeset 462306 395189e8ad34f33fee7e40668f8a9bbec4833820
parent 462305 3f0758e1d89743ff5c2dec8a8c550c5b3228b555
child 462307 de05343e7bd3e922300780b2daf4ed2119581085
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs1444129
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1444129, part 4 - Rename the one field of XPTTypeDescriptorPrefix. r=njn MozReview-Commit-ID: 4rO1xtMfHD6
xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp
xpcom/reflect/xptinfo/xptinfo.h
xpcom/typelib/xpt/xpt_struct.cpp
xpcom/typelib/xpt/xpt_struct.h
--- 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,