Backout 01a5ce645a8b, 6e849614a79f & bd75f26eee25 (bug 720759) for win debug build failures
authorEd Morley <bmo@edmorley.co.uk>
Tue, 24 Jan 2012 21:06:59 +0000
changeset 88087 cac3f64d36d09be1c711301e9347dcc8a06d608a
parent 88086 5e9adf3343de97588622887fea6e5f8f5bfc35fe
child 88088 ea41d0de5a04fa4c0a944004f4cc52c9a6c4a91f
push id129
push userffxbld
push dateFri, 20 Apr 2012 19:40:49 +0000
treeherdermozilla-release@5bcfa0da3be9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs720759
milestone12.0a1
backs out01a5ce645a8b022b64685e0bcc018d1c5ae1b976
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
Backout 01a5ce645a8b, 6e849614a79f & bd75f26eee25 (bug 720759) for win debug build failures
js/src/builtin/MapObject.cpp
js/src/jsapi.cpp
js/src/jsarray.cpp
js/src/jsinterp.cpp
js/src/jsinterp.h
js/src/jsobj.cpp
js/src/jsstr.cpp
js/src/jsstr.h
js/src/jsxml.cpp
js/src/methodjit/FastOps.cpp
js/src/methodjit/StubCalls.cpp
mfbt/GuardObjects.h
--- a/js/src/builtin/MapObject.cpp
+++ b/js/src/builtin/MapObject.cpp
@@ -133,17 +133,17 @@ HashableValue::equals(const HashableValu
     /* Two HashableValues are equal if they have equal bits or they're equal strings. */
     bool b = (value.asRawBits() == other.value.asRawBits()) ||
               (value.isString() &&
                other.value.isString() &&
                EqualStrings(&value.toString()->asLinear(),
                             &other.value.toString()->asLinear()));
 
 #ifdef DEBUG
-    bool same;
+    JSBool same;
     JS_ASSERT(SameValue(NULL, value, other.value, &same));
     JS_ASSERT(same == b);
 #endif
     return b;
 }
 
 
 /*** Map *****************************************************************************************/
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -635,47 +635,35 @@ JS_GetTypeName(JSContext *cx, JSType typ
 }
 
 JS_PUBLIC_API(JSBool)
 JS_StrictlyEqual(JSContext *cx, jsval v1, jsval v2, JSBool *equal)
 {
     AssertNoGC(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, v1, v2);
-    bool eq;
-    if (!StrictlyEqual(cx, v1, v2, &eq))
-        return false;
-    *equal = eq;
-    return true;
+    return StrictlyEqual(cx, v1, v2, equal);
 }
 
 JS_PUBLIC_API(JSBool)
 JS_LooselyEqual(JSContext *cx, jsval v1, jsval v2, JSBool *equal)
 {
     AssertNoGC(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, v1, v2);
-    bool eq;
-    if (!LooselyEqual(cx, v1, v2, &eq))
-        return false;
-    *equal = eq;
-    return true;
+    return LooselyEqual(cx, v1, v2, equal);
 }
 
 JS_PUBLIC_API(JSBool)
 JS_SameValue(JSContext *cx, jsval v1, jsval v2, JSBool *same)
 {
     AssertNoGC(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, v1, v2);
-    bool s;
-    if (!SameValue(cx, v1, v2, &s))
-        return false;
-    *same = s;
-    return true;
+    return SameValue(cx, v1, v2, same);
 }
 
 JS_PUBLIC_API(JSBool)
 JS_IsBuiltinEvalFunction(JSFunction *fun)
 {
     return IsAnyBuiltinEval(fun);
 }
 
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -3127,22 +3127,22 @@ array_indexOfHelper(JSContext *cx, Index
 
     for (;;) {
         Value elt;
         if (!JS_CHECK_OPERATION_LIMIT(cx) ||
             !GetElement(cx, obj, (jsuint)i, &hole, &elt)) {
             return JS_FALSE;
         }
         if (!hole) {
-            bool equal;
+            JSBool equal;
             if (!StrictlyEqual(cx, elt, tosearch, &equal))
-                return false;
+                return JS_FALSE;
             if (equal) {
                 args.rval().setNumber(i);
-                return true;
+                return JS_TRUE;
             }
         }
         if (i == stop)
             goto not_found;
         i += direction;
     }
 
   not_found:
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -830,26 +830,22 @@ js::HasInstance(JSContext *cx, JSObject 
     if (clasp->hasInstance)
         return clasp->hasInstance(cx, obj, v, bp);
     js_ReportValueError(cx, JSMSG_BAD_INSTANCEOF_RHS,
                         JSDVG_SEARCH_STACK, ObjectValue(*obj), NULL);
     return JS_FALSE;
 }
 
 bool
-js::LooselyEqual(JSContext *cx, const Value &lval, const Value &rval, bool *result)
+js::LooselyEqual(JSContext *cx, const Value &lval, const Value &rval, JSBool *result)
 {
 #if JS_HAS_XML_SUPPORT
     if (JS_UNLIKELY(lval.isObject() && lval.toObject().isXML()) ||
                     (rval.isObject() && rval.toObject().isXML())) {
-        JSBool res;
-        if (!js_TestXMLEquality(cx, lval, rval, &res))
-            return false;
-        *result = !!res;
-        return true;
+        return js_TestXMLEquality(cx, lval, rval, result);
     }
 #endif
 
     if (SameType(lval, rval)) {
         if (lval.isString()) {
             JSString *l = lval.toString();
             JSString *r = rval.toString();
             return EqualStrings(cx, l, r, result);
@@ -861,21 +857,17 @@ js::LooselyEqual(JSContext *cx, const Va
             return true;
         }
 
         if (lval.isObject()) {
             JSObject *l = &lval.toObject();
             JSObject *r = &rval.toObject();
 
             if (JSEqualityOp eq = l->getClass()->ext.equality) {
-                JSBool res;
-                if (!eq(cx, l, &rval, &res))
-                    return false;
-                *result = !!res;
-                return true;
+                return eq(cx, l, &rval, result);
             }
 
             *result = l == r;
             return true;
         }
 
         *result = lval.payloadAsRawUint32() == rval.payloadAsRawUint32();
         return true;
@@ -908,17 +900,17 @@ js::LooselyEqual(JSContext *cx, const Va
     double l, r;
     if (!ToNumber(cx, lvalue, &l) || !ToNumber(cx, rvalue, &r))
         return false;
     *result = JSDOUBLE_COMPARE(l, ==, r, false);
     return true;
 }
 
 bool
-js::StrictlyEqual(JSContext *cx, const Value &lref, const Value &rref, bool *equal)
+js::StrictlyEqual(JSContext *cx, const Value &lref, const Value &rref, JSBool *equal)
 {
     Value lval = lref, rval = rref;
     if (SameType(lval, rval)) {
         if (lval.isString())
             return EqualStrings(cx, lval.toString(), rval.toString(), equal);
         if (lval.isDouble()) {
             *equal = JSDOUBLE_COMPARE(lval.toDouble(), ==, rval.toDouble(), JS_FALSE);
             return true;
@@ -960,17 +952,17 @@ IsNegativeZero(const Value &v)
 
 static inline bool
 IsNaN(const Value &v)
 {
     return v.isDouble() && JSDOUBLE_IS_NaN(v.toDouble());
 }
 
 bool
-js::SameValue(JSContext *cx, const Value &v1, const Value &v2, bool *same)
+js::SameValue(JSContext *cx, const Value &v1, const Value &v2, JSBool *same)
 {
     if (IsNegativeZero(v1)) {
         *same = IsNegativeZero(v2);
         return true;
     }
     if (IsNegativeZero(v2)) {
         *same = false;
         return true;
@@ -2267,17 +2259,17 @@ BEGIN_CASE(JSOP_BITAND)
 END_CASE(JSOP_BITAND)
 
 #undef BITWISE_OP
 
 #define EQUALITY_OP(OP)                                                       \
     JS_BEGIN_MACRO                                                            \
         Value rval = regs.sp[-1];                                             \
         Value lval = regs.sp[-2];                                             \
-        bool cond;                                                            \
+        JSBool cond;                                                          \
         if (!LooselyEqual(cx, lval, rval, &cond))                             \
             goto error;                                                       \
         cond = cond OP JS_TRUE;                                               \
         TRY_BRANCH_AFTER_COND(cond, 2);                                       \
         regs.sp--;                                                            \
         regs.sp[-1].setBoolean(cond);                                         \
     JS_END_MACRO
 
@@ -2290,17 +2282,17 @@ BEGIN_CASE(JSOP_NE)
 END_CASE(JSOP_NE)
 
 #undef EQUALITY_OP
 
 #define STRICT_EQUALITY_OP(OP, COND)                                          \
     JS_BEGIN_MACRO                                                            \
         const Value &rref = regs.sp[-1];                                      \
         const Value &lref = regs.sp[-2];                                      \
-        bool equal;                                                           \
+        JSBool equal;                                                         \
         if (!StrictlyEqual(cx, lref, rref, &equal))                           \
             goto error;                                                       \
         COND = equal OP JS_TRUE;                                              \
         regs.sp--;                                                            \
     JS_END_MACRO
 
 BEGIN_CASE(JSOP_STRICTEQ)
 {
--- a/js/src/jsinterp.h
+++ b/js/src/jsinterp.h
@@ -234,24 +234,24 @@ CheckRedeclaration(JSContext *cx, JSObje
 
 inline bool
 CheckRedeclaration(JSContext *cx, JSObject *obj, PropertyName *name, uintN attrs)
 {
     return CheckRedeclaration(cx, obj, ATOM_TO_JSID(name), attrs);
 }
 
 extern bool
-StrictlyEqual(JSContext *cx, const Value &lval, const Value &rval, bool *equal);
+StrictlyEqual(JSContext *cx, const Value &lval, const Value &rval, JSBool *equal);
 
 extern bool
-LooselyEqual(JSContext *cx, const Value &lval, const Value &rval, bool *equal);
+LooselyEqual(JSContext *cx, const Value &lval, const Value &rval, JSBool *equal);
 
 /* === except that NaN is the same as NaN and -0 is not the same as +0. */
 extern bool
-SameValue(JSContext *cx, const Value &v1, const Value &v2, bool *same);
+SameValue(JSContext *cx, const Value &v1, const Value &v2, JSBool *same);
 
 extern JSType
 TypeOfValue(JSContext *cx, const Value &v);
 
 extern JSBool
 HasInstance(JSContext *cx, JSObject *obj, const js::Value *v, JSBool *bp);
 
 extern bool
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -2136,27 +2136,27 @@ DefinePropertyOnObject(JSContext *cx, JS
 
     const Shape *shape = reinterpret_cast<Shape *>(current);
     do {
         if (desc.isAccessorDescriptor()) {
             if (!shape->isAccessorDescriptor())
                 break;
 
             if (desc.hasGet) {
-                bool same;
+                JSBool same;
                 if (!SameValue(cx, desc.getterValue(), shape->getterOrUndefined(), &same))
-                    return false;
+                    return JS_FALSE;
                 if (!same)
                     break;
             }
 
             if (desc.hasSet) {
-                bool same;
+                JSBool same;
                 if (!SameValue(cx, desc.setterValue(), shape->setterOrUndefined(), &same))
-                    return false;
+                    return JS_FALSE;
                 if (!same)
                     break;
             }
         } else {
             /*
              * Determine the current value of the property once, if the current
              * value might actually need to be used or preserved later.  NB: we
              * guard on whether the current property is a data descriptor to
@@ -2185,20 +2185,20 @@ DefinePropertyOnObject(JSContext *cx, JS
                 if (!js_NativeGet(cx, obj, obj2, shape, JSGET_NO_METHOD_BARRIER, &v))
                     return JS_FALSE;
             }
 
             if (desc.isDataDescriptor()) {
                 if (!shape->isDataDescriptor())
                     break;
 
-                bool same;
+                JSBool same;
                 if (desc.hasValue) {
                     if (!SameValue(cx, desc.value, v, &same))
-                        return false;
+                        return JS_FALSE;
                     if (!same) {
                         /*
                          * Insist that a non-configurable js::PropertyOp data
                          * property is frozen at exactly the last-got value.
                          *
                          * Duplicate the first part of the big conjunction that
                          * we tested above, rather than add a local bool flag.
                          * Likewise, don't try to keep shape->writable() in a
@@ -2263,41 +2263,41 @@ DefinePropertyOnObject(JSContext *cx, JS
             return Reject(cx, JSMSG_CANT_REDEFINE_PROP, throwError, id, rval);
     } else if (desc.isDataDescriptor()) {
         /* 8.12.9 step 10. */
         JS_ASSERT(shape->isDataDescriptor());
         if (!shape->configurable() && !shape->writable()) {
             if (desc.hasWritable && desc.writable())
                 return Reject(cx, JSMSG_CANT_REDEFINE_PROP, throwError, id, rval);
             if (desc.hasValue) {
-                bool same;
+                JSBool same;
                 if (!SameValue(cx, desc.value, v, &same))
-                    return false;
+                    return JS_FALSE;
                 if (!same)
                     return Reject(cx, JSMSG_CANT_REDEFINE_PROP, throwError, id, rval);
             }
         }
 
         callDelProperty = !shape->hasDefaultGetter() || !shape->hasDefaultSetter();
     } else {
         /* 8.12.9 step 11. */
         JS_ASSERT(desc.isAccessorDescriptor() && shape->isAccessorDescriptor());
         if (!shape->configurable()) {
             if (desc.hasSet) {
-                bool same;
+                JSBool same;
                 if (!SameValue(cx, desc.setterValue(), shape->setterOrUndefined(), &same))
-                    return false;
+                    return JS_FALSE;
                 if (!same)
                     return Reject(cx, JSMSG_CANT_REDEFINE_PROP, throwError, id, rval);
             }
 
             if (desc.hasGet) {
-                bool same;
+                JSBool same;
                 if (!SameValue(cx, desc.getterValue(), shape->getterOrUndefined(), &same))
-                    return false;
+                    return JS_FALSE;
                 if (!same)
                     return Reject(cx, JSMSG_CANT_REDEFINE_PROP, throwError, id, rval);
             }
         }
     }
 
     /* 8.12.9 step 12. */
     uintN attrs;
--- a/js/src/jsstr.cpp
+++ b/js/src/jsstr.cpp
@@ -3373,17 +3373,17 @@ js_ValueToSource(JSContext *cx, const Va
     }
 
     return ToString(cx, rval);
 }
 
 namespace js {
 
 bool
-EqualStrings(JSContext *cx, JSString *str1, JSString *str2, bool *result)
+EqualStrings(JSContext *cx, JSString *str1, JSString *str2, JSBool *result)
 {
     if (str1 == str2) {
         *result = true;
         return true;
     }
 
     size_t length1 = str1->length();
     if (length1 != str2->length()) {
--- a/js/src/jsstr.h
+++ b/js/src/jsstr.h
@@ -181,21 +181,17 @@ js_ValueToSource(JSContext *cx, const js
 
 namespace js {
 
 /*
  * Test if strings are equal. The caller can call the function even if str1
  * or str2 are not GC-allocated things.
  */
 extern bool
-EqualStrings(JSContext *cx, JSString *str1, JSString *str2, bool *result);
-
-/* Use the infallible method instead! */
-extern bool
-EqualStrings(JSContext *cx, JSLinearString *str1, JSLinearString *str2, bool *result) MOZ_DELETE;
+EqualStrings(JSContext *cx, JSString *str1, JSString *str2, JSBool *result);
 
 /* EqualStrings is infallible on linear strings. */
 extern bool
 EqualStrings(JSLinearString *str1, JSLinearString *str2);
 
 /*
  * Return less than, equal to, or greater than zero depending on whether
  * str1 is less than, equal to, or greater than str2.
--- a/js/src/jsxml.cpp
+++ b/js/src/jsxml.cpp
@@ -3379,20 +3379,18 @@ retry:
               EqualStrings(qn->getNameURI(), vqn->getNameURI());
     } else {
         *bp = vqn == NULL;
     }
     if (!*bp)
         return JS_TRUE;
 
     if (JSXML_HAS_VALUE(xml)) {
-        bool equal;
-        if (!EqualStrings(cx, xml->xml_value, vxml->xml_value, &equal))
+        if (!EqualStrings(cx, xml->xml_value, vxml->xml_value, bp))
             return JS_FALSE;
-        *bp = equal;
     } else if (xml->xml_kids.length != vxml->xml_kids.length) {
         *bp = JS_FALSE;
     } else {
         {
             JSXMLArrayCursor<JSXML> cursor(&xml->xml_kids);
             JSXMLArrayCursor<JSXML> vcursor(&vxml->xml_kids);
             for (;;) {
                 kid = cursor.getNext();
@@ -3422,20 +3420,18 @@ retry:
                 j = XMLARRAY_FIND_MEMBER(&vxml->xml_attrs, attr, attr_identity);
                 if (j == XML_NOT_FOUND) {
                     *bp = JS_FALSE;
                     break;
                 }
                 vattr = XMLARRAY_MEMBER(&vxml->xml_attrs, j, JSXML);
                 if (!vattr)
                     continue;
-                bool equal;
-                if (!EqualStrings(cx, attr->xml_value, vattr->xml_value, &equal))
+                if (!EqualStrings(cx, attr->xml_value, vattr->xml_value, bp))
                     return JS_FALSE;
-                *bp = equal;
             }
         }
     }
 
     return JS_TRUE;
 }
 
 /* ECMA-357 9.1.1.9 XML [[Equals]] and 9.2.1.9 XMLList [[Equals]]. */
@@ -5274,47 +5270,38 @@ js_TestXMLEquality(JSContext *cx, const 
                  HasSimpleContent(vxml)) ||
                 ((vxml->xml_class == JSXML_CLASS_TEXT ||
                   vxml->xml_class == JSXML_CLASS_ATTRIBUTE) &&
                  HasSimpleContent(xml))) {
                 ok = js_EnterLocalRootScope(cx);
                 if (ok) {
                     ok = (str = ToStringSlow(cx, ObjectValue(*obj))) &&
                          (vstr = ToString(cx, v));
-                    if (ok) {
-                        bool equal;
-                        ok = EqualStrings(cx, str, vstr, &equal);
-                        *bp = equal;
-                    }
+                    if (ok)
+                        ok = EqualStrings(cx, str, vstr, bp);
                     js_LeaveLocalRootScope(cx);
                 }
             } else {
                 ok = XMLEquals(cx, xml, vxml, bp);
             }
         }
     } else {
         ok = js_EnterLocalRootScope(cx);
         if (ok) {
             if (HasSimpleContent(xml)) {
                 ok = (str = ToString(cx, ObjectValue(*obj))) &&
                      (vstr = ToString(cx, v));
-                if (ok) {
-                    bool equal;
-                    ok = EqualStrings(cx, str, vstr, &equal);
-                    *bp = equal;
-                }
+                if (ok)
+                    ok = EqualStrings(cx, str, vstr, bp);
             } else if (JSVAL_IS_STRING(v) || JSVAL_IS_NUMBER(v)) {
                 str = ToString(cx, ObjectValue(*obj));
                 if (!str) {
                     ok = JS_FALSE;
                 } else if (JSVAL_IS_STRING(v)) {
-                    bool equal;
-                    ok = EqualStrings(cx, str, JSVAL_TO_STRING(v), &equal);
-                    if (ok)
-                        *bp = equal;
+                    ok = EqualStrings(cx, str, JSVAL_TO_STRING(v), bp);
                 } else {
                     ok = JS_ValueToNumber(cx, STRING_TO_JSVAL(str), &d);
                     if (ok) {
                         d2 = JSVAL_IS_INT(v) ? JSVAL_TO_INT(v)
                                              : JSVAL_TO_DOUBLE(v);
                         *bp = JSDOUBLE_COMPARE(d, ==, d2, JS_FALSE);
                     }
                 }
--- a/js/src/methodjit/FastOps.cpp
+++ b/js/src/methodjit/FastOps.cpp
@@ -2295,17 +2295,17 @@ mjit::Compiler::jsop_stricteq(JSOp op)
 
     /*
      * NB: x64 can do full-Value comparisons. This is beneficial
      * to do if the payload/type are not yet in registers.
      */
 
     /* Constant-fold. */
     if (lhs->isConstant() && rhs->isConstant()) {
-        bool b;
+        JSBool b;
         StrictlyEqual(cx, lhs->getValue(), rhs->getValue(), &b);
         frame.popn(2);
         frame.push(BooleanValue((op == JSOP_STRICTEQ) ? b : !b));
         return;
     }
 
     if (frame.haveSameBacking(lhs, rhs)) {
         /* False iff NaN. */
--- a/js/src/methodjit/StubCalls.cpp
+++ b/js/src/methodjit/StubCalls.cpp
@@ -563,64 +563,61 @@ stubs::ValueToBoolean(VMFrame &f)
 
 void JS_FASTCALL
 stubs::Not(VMFrame &f)
 {
     JSBool b = !js_ValueToBoolean(f.regs.sp[-1]);
     f.regs.sp[-1].setBoolean(b);
 }
 
-template <bool EQ, bool IFNAN>
+template <JSBool EQ, bool IFNAN>
 static inline bool
 StubEqualityOp(VMFrame &f)
 {
     JSContext *cx = f.cx;
     FrameRegs &regs = f.regs;
 
     Value rval = regs.sp[-1];
     Value lval = regs.sp[-2];
 
-    bool cond;
+    JSBool cond;
 
     /* The string==string case is easily the hottest;  try it first. */
     if (lval.isString() && rval.isString()) {
         JSString *l = lval.toString();
         JSString *r = rval.toString();
-        bool equal;
+        JSBool equal;
         if (!EqualStrings(cx, l, r, &equal))
             return false;
         cond = equal == EQ;
     } else
 #if JS_HAS_XML_SUPPORT
     if ((lval.isObject() && lval.toObject().isXML()) ||
-        (rval.isObject() && rval.toObject().isXML()))
-    {
-        JSBool equal;
-        if (!js_TestXMLEquality(cx, lval, rval, &equal))
+        (rval.isObject() && rval.toObject().isXML())) {
+        if (!js_TestXMLEquality(cx, lval, rval, &cond))
             return false;
-        cond = !!equal == EQ;
+        cond = cond == EQ;
     } else
 #endif
 
     if (SameType(lval, rval)) {
         JS_ASSERT(!lval.isString());    /* this case is handled above */
         if (lval.isDouble()) {
             double l = lval.toDouble();
             double r = rval.toDouble();
             if (EQ)
                 cond = JSDOUBLE_COMPARE(l, ==, r, IFNAN);
             else
                 cond = JSDOUBLE_COMPARE(l, !=, r, IFNAN);
         } else if (lval.isObject()) {
             JSObject *l = &lval.toObject(), *r = &rval.toObject();
             if (JSEqualityOp eq = l->getClass()->ext.equality) {
-                JSBool equal;
-                if (!eq(cx, l, &rval, &equal))
+                if (!eq(cx, l, &rval, &cond))
                     return false;
-                cond = !!equal == EQ;
+                cond = cond == EQ;
             } else {
                 cond = (l == r) == EQ;
             }
         } else if (lval.isNullOrUndefined()) {
             cond = EQ;
         } else {
             cond = (lval.payloadAsRawUint32() == rval.payloadAsRawUint32()) == EQ;
         }
@@ -637,17 +634,17 @@ StubEqualityOp(VMFrame &f)
 
             /*
              * The string==string case is repeated because ToPrimitive can
              * convert lval/rval to strings.
              */
             if (lval.isString() && rval.isString()) {
                 JSString *l = lval.toString();
                 JSString *r = rval.toString();
-                bool equal;
+                JSBool equal;
                 if (!EqualStrings(cx, l, r, &equal))
                     return false;
                 cond = equal == EQ;
             } else {
                 double l, r;
                 if (!ToNumber(cx, lval, &l) || !ToNumber(cx, rval, &r))
                     return false;
 
@@ -661,25 +658,25 @@ StubEqualityOp(VMFrame &f)
 
     regs.sp[-2].setBoolean(cond);
     return true;
 }
 
 JSBool JS_FASTCALL
 stubs::Equal(VMFrame &f)
 {
-    if (!StubEqualityOp<true, false>(f))
+    if (!StubEqualityOp<JS_TRUE, false>(f))
         THROWV(JS_FALSE);
     return f.regs.sp[-2].toBoolean();
 }
 
 JSBool JS_FASTCALL
 stubs::NotEqual(VMFrame &f)
 {
-    if (!StubEqualityOp<false, true>(f))
+    if (!StubEqualityOp<JS_FALSE, true>(f))
         THROWV(JS_FALSE);
     return f.regs.sp[-2].toBoolean();
 }
 
 void JS_FASTCALL
 stubs::Add(VMFrame &f)
 {
     JSContext *cx = f.cx;
@@ -1317,29 +1314,29 @@ stubs::TypeOf(VMFrame &f)
     return f.cx->runtime->atomState.typeAtoms[type];
 }
 
 void JS_FASTCALL
 stubs::StrictEq(VMFrame &f)
 {
     const Value &rhs = f.regs.sp[-1];
     const Value &lhs = f.regs.sp[-2];
-    bool equal;
+    JSBool equal;
     if (!StrictlyEqual(f.cx, lhs, rhs, &equal))
         THROW();
     f.regs.sp--;
     f.regs.sp[-1].setBoolean(equal == JS_TRUE);
 }
 
 void JS_FASTCALL
 stubs::StrictNe(VMFrame &f)
 {
     const Value &rhs = f.regs.sp[-1];
     const Value &lhs = f.regs.sp[-2];
-    bool equal;
+    JSBool equal;
     if (!StrictlyEqual(f.cx, lhs, rhs, &equal))
         THROW();
     f.regs.sp--;
     f.regs.sp[-1].setBoolean(equal != JS_TRUE);
 }
 
 void JS_FASTCALL
 stubs::Throw(VMFrame &f)
--- a/mfbt/GuardObjects.h
+++ b/mfbt/GuardObjects.h
@@ -39,17 +39,16 @@
  * ***** END LICENSE BLOCK ***** */
 
 /* Implementation of macros to ensure correct use of RAII Auto* objects. */
 
 #ifndef mozilla_GuardObjects_h
 #define mozilla_GuardObjects_h
 
 #include "mozilla/Assertions.h"
-#include "mozilla/Types.h"
 
 #ifdef __cplusplus
 
 #ifdef DEBUG
 
 namespace mozilla {
 namespace detail {
 /*
@@ -95,34 +94,34 @@ namespace detail {
  *     a base class that also uses these macros
  *   MOZ_GUARD_OBJECT_NOTIFIER_INIT is a statement that belongs in each
  *     constructor. It uses the parameter declared by
  *     MOZ_GUARD_OBJECT_NOTIFIER_PARAM.
  *
  * For more details, and examples of using these macros, see
  * https://developer.mozilla.org/en/Using_RAII_classes_in_Mozilla
  */
-class MOZ_EXPORT_API(GuardObjectNotifier)
+class GuardObjectNotifier
 {
   private:
     bool* statementDone;
 
   public:
     GuardObjectNotifier() : statementDone(NULL) {}
 
     ~GuardObjectNotifier() {
         *statementDone = true;
     }
 
     void setStatementDone(bool* statementIsDone) {
         statementDone = statementIsDone;
     }
 };
 
-class MOZ_EXPORT_API(GuardObjectNotificationReceiver)
+class GuardObjectNotificationReceiver
 {
   private:
     bool statementDone;
 
   public:
     GuardObjectNotificationReceiver() : statementDone(false) {}
 
     ~GuardObjectNotificationReceiver() {