Bug 692342 - Remove IsPointer() and IsReference() accessors and flag the bits as deprecated. r=mrbkap
authorBobby Holley <bobbyholley@gmail.com>
Fri, 25 Nov 2011 17:09:07 -0800
changeset 80800 0408a35a67f9537ae901b787928fc877d184e8b8
parent 80799 911074d770a243111ba38651c19cc2a182715400
child 80801 5c6903c68234a2a290861eaa9cf921989281d2bf
push id21530
push userbmo@edmorley.co.uk
push dateSat, 26 Nov 2011 08:27:28 +0000
treeherdermozilla-central@c58bad0b4640 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs692342
milestone11.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 692342 - Remove IsPointer() and IsReference() accessors and flag the bits as deprecated. r=mrbkap
xpcom/reflect/xptinfo/public/xptinfo.h
xpcom/typelib/xpt/public/xpt_struct.h
--- a/xpcom/reflect/xptinfo/public/xptinfo.h
+++ b/xpcom/reflect/xptinfo/public/xptinfo.h
@@ -66,22 +66,16 @@ public:
         {flags = val; return *this;}
 
     nsXPTType& operator=(const nsXPTType& other)
         {flags = other.flags; return *this;}
 
     operator PRUint8() const
         {return flags;}
 
-    bool IsPointer() const
-        {return 0 != (XPT_TDP_IS_POINTER(flags));}
-
-    bool IsReference() const
-        {return 0 != (XPT_TDP_IS_REFERENCE(flags));}
-
     // '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
--- a/xpcom/typelib/xpt/public/xpt_struct.h
+++ b/xpcom/typelib/xpt/public/xpt_struct.h
@@ -331,18 +331,21 @@ XPT_NewStringZ(XPTArena *arena, char *by
  */
 
 /* why bother with a struct?  - other code relies on this being a struct */
 struct XPTTypeDescriptorPrefix {
     PRUint8 flags;
 };
 
 /* flag bits -- fur and jband were right, I was miserably wrong */
+
+// THESE TWO FLAGS ARE DEPRECATED. DO NOT USE THEM. See bug 692342.
 #define XPT_TDP_POINTER          0x80
 #define XPT_TDP_REFERENCE        0x20
+
 #define XPT_TDP_FLAGMASK         0xe0
 #define XPT_TDP_TAGMASK          (~XPT_TDP_FLAGMASK)
 #define XPT_TDP_TAG(tdp)         ((tdp).flags & XPT_TDP_TAGMASK)
 
 #define XPT_TDP_IS_POINTER(flags)        (flags & XPT_TDP_POINTER)
 #define XPT_TDP_IS_REFERENCE(flags)      (flags & XPT_TDP_REFERENCE)
 
 /*