Bug 1475409 - Part 1: Remove nsXPTType::TagPart(), r=mccr8
☠☠ backed out by 113e9ca0b5bc ☠ ☠
authorNika Layzell <nika@thelayzells.com>
Wed, 11 Jul 2018 10:30:04 -0400
changeset 428504 850f21ca1f451ff48acb72f79c2c316d90fe9c07
parent 428503 320802ab02e3958b7df55dd6d95e10c542d7ee67
child 428505 bddd838d19102d55d131a62158d8cb4b5c637284
push id34337
push userncsoregi@mozilla.com
push dateThu, 26 Jul 2018 21:58:45 +0000
treeherdermozilla-central@8f2f847b2f9d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1475409
milestone63.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 1475409 - Part 1: Remove nsXPTType::TagPart(), r=mccr8 Reviewers: mccr8! Tags: #secure-revision Bug #: 1475409 Differential Revision: https://phabricator.services.mozilla.com/D2113
js/xpconnect/src/XPCConvert.cpp
xpcom/reflect/xptinfo/xptinfo.h
--- a/js/xpconnect/src/XPCConvert.cpp
+++ b/js/xpconnect/src/XPCConvert.cpp
@@ -53,17 +53,17 @@ XPCConvert::IsMethodReflectable(const ns
         return false;
 
     for (int i = info.GetParamCount() - 1; i >= 0; i--) {
         const nsXPTParamInfo& param = info.GetParam(i);
         const nsXPTType& type = param.GetType();
 
         // Reflected methods can't use native types. All native types end up
         // getting tagged as void*, so this check is easy.
-        if (type.TagPart() == nsXPTType::T_VOID)
+        if (type.Tag() == nsXPTType::T_VOID)
             return false;
     }
     return true;
 }
 
 static JSObject*
 UnwrapNativeCPOW(nsISupports* wrapper)
 {
@@ -103,17 +103,17 @@ XPCConvert::NativeData2JS(MutableHandleV
                           uint32_t arrlen, nsresult* pErr)
 {
     MOZ_ASSERT(s, "bad param");
 
     AutoJSContext cx;
     if (pErr)
         *pErr = NS_ERROR_XPC_BAD_CONVERT_NATIVE;
 
-    switch (type.TagPart()) {
+    switch (type.Tag()) {
     case nsXPTType::T_I8    :
         d.setInt32(*static_cast<const int8_t*>(s));
         return true;
     case nsXPTType::T_I16   :
         d.setInt32(*static_cast<const int16_t*>(s));
         return true;
     case nsXPTType::T_I32   :
         d.setInt32(*static_cast<const int32_t*>(s));
@@ -450,17 +450,17 @@ XPCConvert::JSData2Native(void* d, Handl
 
     AutoJSContext cx;
     if (pErr)
         *pErr = NS_ERROR_XPC_BAD_CONVERT_JS;
 
     bool sizeis = type.Tag() == TD_PSTRING_SIZE_IS ||
         type.Tag() == TD_PWSTRING_SIZE_IS;
 
-    switch (type.TagPart()) {
+    switch (type.Tag()) {
     case nsXPTType::T_I8     :
         return ConvertToPrimitive(cx, s, static_cast<int8_t*>(d));
     case nsXPTType::T_I16    :
         return ConvertToPrimitive(cx, s, static_cast<int16_t*>(d));
     case nsXPTType::T_I32    :
         return ConvertToPrimitive(cx, s, static_cast<int32_t*>(d));
     case nsXPTType::T_I64    :
         return ConvertToPrimitive(cx, s, static_cast<int64_t*>(d));
--- a/xpcom/reflect/xptinfo/xptinfo.h
+++ b/xpcom/reflect/xptinfo/xptinfo.h
@@ -317,18 +317,17 @@ public:
     return xpt::detail::GetType((uint8_t)aInner);
   }
 
   ///////////////////////////////////////
   // nsXPTType backwards compatibility //
   ///////////////////////////////////////
 
   nsXPTType& operator=(uint8_t aPrefix) { mTag = aPrefix; return *this; }
-  operator uint8_t() const { return TagPart(); };
-  uint8_t TagPart() const { return mTag; };
+  operator uint8_t() const { return mTag; };
 
   enum // Re-export TD_ interfaces from nsXPTType
   {
     T_I8                = TD_INT8             ,
     T_I16               = TD_INT16            ,
     T_I32               = TD_INT32            ,
     T_I64               = TD_INT64            ,
     T_U8                = TD_UINT8            ,