rename fields of XPTInterfaceDirectoryEntry draft
authorAndrew McCreight <continuation@gmail.com>
Wed, 28 Feb 2018 14:18:05 -0800
changeset 762244 6ec18a5287f08278b6a02600acb23f8f7d826c17
parent 762243 644e3349766b8a9d8e8f4ee28929aed02d2f84f3
child 762245 ab882325af45beb5aae9b9f178ee287018927cf7
push id101107
push userbmo:continuation@gmail.com
push dateThu, 01 Mar 2018 22:22:59 +0000
milestone60.0a1
rename fields of XPTInterfaceDirectoryEntry MozReview-Commit-ID: FlrB8m6WVqg
xpcom/reflect/xptinfo/xptiInterfaceInfoManager.cpp
xpcom/reflect/xptinfo/xptiTypelibGuts.cpp
xpcom/typelib/xpt/xpt_struct.h
--- a/xpcom/reflect/xptinfo/xptiInterfaceInfoManager.cpp
+++ b/xpcom/reflect/xptinfo/xptiInterfaceInfoManager.cpp
@@ -125,27 +125,27 @@ XPTInterfaceInfoManager::VerifyAndAddEnt
     if (interfaceDescriptor->num_methods > 250 &&
             !interfaceDescriptor->IsBuiltinClass()) {
         NS_ASSERTION(0, "Too many methods to handle for the stub, cannot load");
         fprintf(stderr, "ignoring too large interface: %s\n", name);
         return;
     }
 
     mWorkingSet.mTableReentrantMonitor.AssertCurrentThreadIn();
-    xptiInterfaceEntry* entry = mWorkingSet.mIIDTable.Get(iface->iid);
+    xptiInterfaceEntry* entry = mWorkingSet.mIIDTable.Get(iface->mIID);
     if (entry) {
         // XXX validate this info to find possible inconsistencies
         LOG_AUTOREG(("      ignoring repeated interface: %s\n", name));
         return;
     }
 
     // Build a new xptiInterfaceEntry object and hook it up.
 
     entry = xptiInterfaceEntry::Create(name,
-                                       iface->iid,
+                                       iface->mIID,
                                        header,
                                        interfaceDescriptor,
                                        typelib);
     if (!entry)
         return;
 
     //XXX  We should SetHeader too as part of the validation, no?
     entry->SetScriptableFlag(interfaceDescriptor->IsScriptable());
--- a/xpcom/reflect/xptinfo/xptiTypelibGuts.cpp
+++ b/xpcom/reflect/xptinfo/xptiTypelibGuts.cpp
@@ -46,20 +46,20 @@ xptiTypelibGuts::GetEntryAt(uint16_t i)
 
     const XPTInterfaceDirectoryEntry* iface = mHeader->mEntries + i;
 
     XPTInterfaceInfoManager::xptiWorkingSet& set =
         XPTInterfaceInfoManager::GetSingleton()->mWorkingSet;
 
     {
         ReentrantMonitorAutoEnter monitor(set.mTableReentrantMonitor);
-        if (iface->iid.Equals(zeroIID))
+        if (iface->mIID.Equals(zeroIID))
             r = set.mNameTable.Get(iface->Name(mHeader));
         else
-            r = set.mIIDTable.Get(iface->iid);
+            r = set.mIIDTable.Get(iface->mIID);
     }
 
     if (r)
         SetEntryAt(i, r);
 
     return r;
 }
 
--- a/xpcom/typelib/xpt/xpt_struct.h
+++ b/xpcom/typelib/xpt/xpt_struct.h
@@ -32,19 +32,19 @@ struct XPTHeader {
  * An array of directory entries is used to quickly locate an interface
  * description using its IID.  No interface should appear more than once in the
  * array.
  */
 struct XPTInterfaceDirectoryEntry {
   inline const XPTInterfaceDescriptor* InterfaceDescriptor(const XPTHeader* aHeader) const;
   inline const char* Name(const XPTHeader* aHeader) const;
 
-  nsID iid;
-  const char* name;
-  const XPTInterfaceDescriptor* interface_descriptor;
+  nsID mIID;
+  const char* mName;
+  const XPTInterfaceDescriptor* mInterfaceDescriptor;
 };
 
 /*
  * An InterfaceDescriptor describes a single XPCOM interface, including all of
  * its methods.
  */
 struct XPTInterfaceDescriptor {
   static const uint8_t kScriptableMask =                0x80;
@@ -216,22 +216,22 @@ struct XPTMethodDescriptor {
   const char* name;
   const XPTParamDescriptor* params;
   uint8_t flags;
   uint8_t num_args;
 };
 
 const char*
 XPTInterfaceDirectoryEntry::Name(const XPTHeader* aHeader) const {
-  return name;
+  return mName;
 }
 
 const XPTInterfaceDescriptor*
 XPTInterfaceDirectoryEntry::InterfaceDescriptor(const XPTHeader* aHeader) const {
-  return interface_descriptor;
+  return mInterfaceDescriptor;
 }
 
 const XPTMethodDescriptor&
 XPTInterfaceDescriptor::Method(const XPTHeader* aHeader, size_t aIndex) const {
   return method_descriptors[aIndex];
 }
 
 const XPTConstDescriptor&