[INFER] Don't truncate object types when testing for particular primitive types, bug 682855.
authorBrian Hackett <bhackett1024@gmail.com>
Mon, 29 Aug 2011 14:01:51 -0700
changeset 76161 cbda722273a9c8f56c68d045ce3e28fc8f4fda70
parent 76160 40d6de723ea80b2f558eac8d0df45c5704ef3aea
child 76162 6c8e0affe03e4b3eaa7482807998a44cf8e53e6a
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
bugs682855
milestone9.0a1
[INFER] Don't truncate object types when testing for particular primitive types, bug 682855.
js/src/jsinfer.h
--- a/js/src/jsinfer.h
+++ b/js/src/jsinfer.h
@@ -87,17 +87,17 @@ class Type
     jsuword raw() const { return data; }
 
     bool isPrimitive() const {
         return data < JSVAL_TYPE_OBJECT;
     }
 
     bool isPrimitive(JSValueType type) const {
         JS_ASSERT(type < JSVAL_TYPE_OBJECT);
-        return type == (JSValueType) data;
+        return (jsuword) type == data;
     }
 
     JSValueType primitive() const {
         JS_ASSERT(isPrimitive());
         return (JSValueType) data;
     }
 
     bool isAnyObject() const {