Forgot to string-tag before going from atom to jsid in two builtins.
authorBrendan Eich <brendan@mozilla.org>
Wed, 13 Aug 2008 17:20:16 -0700
changeset 18149 baac751c4bf54243cdeb047afe121381b9a71a88
parent 18148 e4548362fa74e5449c76dcda675959130cf8f863
child 18150 3f7b8558a1a7ca6d5f0162dcd0d33e94240502fd
child 18152 4d81cfd3f6e4bd20bc76626faffd39ff770c629c
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1a2pre
Forgot to string-tag before going from atom to jsid in two builtins.
js/src/jsbuiltins.cpp
--- a/js/src/jsbuiltins.cpp
+++ b/js/src/jsbuiltins.cpp
@@ -526,28 +526,30 @@ js_TypeOfBoolean(JSContext* cx, jsint un
     JS_ASSERT(JSVAL_IS_VOID(boxed) || JSVAL_IS_BOOLEAN(boxed));
     JSType type = JS_TypeOfValue(cx, boxed);
     return ATOM_TO_STRING(cx->runtime->atomState.typeAtoms[type]);
 }
 
 jsint FASTCALL
 js_Object_p_hasOwnProperty(JSContext* cx, JSObject* obj, JSString *str)
 {
+    jsid id = ATOM_TO_JSID(STRING_TO_JSVAL(str));
     jsval v;
-    if (!js_HasOwnProperty(cx, obj->map->ops->lookupProperty, obj, ATOM_TO_JSID(str), &v))
+    if (!js_HasOwnProperty(cx, obj->map->ops->lookupProperty, obj, id, &v))
         return JSVAL_TO_BOOLEAN(JSVAL_VOID);
     JS_ASSERT(JSVAL_IS_BOOLEAN(v));
     return JSVAL_TO_BOOLEAN(v);
 }
 
 jsint FASTCALL
 js_Object_p_propertyIsEnumerable(JSContext* cx, JSObject* obj, JSString *str)
 {
+    jsid id = ATOM_TO_JSID(STRING_TO_JSVAL(str));
     jsval v;
-    if (!js_PropertyIsEnumerable(cx, obj, ATOM_TO_JSID(str), &v))
+    if (!js_PropertyIsEnumerable(cx, obj, id, &v))
         return -1;
     JS_ASSERT(JSVAL_IS_BOOLEAN(v));
     return JSVAL_TO_BOOLEAN(v);
 }
 
 jsdouble FASTCALL
 js_BooleanToNumber(JSContext* cx, jsint unboxed)
 {