[Bug 432881] SM: JSVAL_VOID as a pseudo-boolean. r=brendan

This commit is contained in:
Igor Bukanov
2008-06-25 11:43:02 +02:00
parent a36f85eb33
commit 1aa5c32a96
10 changed files with 56 additions and 77 deletions

View File

@@ -2894,7 +2894,7 @@ js_AllocSlot(JSContext *cx, JSObject *obj, uint32 *slotp)
}
/* js_ReallocSlots or js_FreeSlot should set the free slots to void. */
JS_ASSERT(STOBJ_GET_SLOT(obj, map->freeslot) == JSVAL_VOID);
JS_ASSERT(JSVAL_IS_VOID(STOBJ_GET_SLOT(obj, map->freeslot)));
*slotp = map->freeslot++;
return JS_TRUE;
}
@@ -4691,7 +4691,7 @@ js_PrimitiveToObject(JSContext *cx, jsval *vp)
};
JS_ASSERT(!JSVAL_IS_OBJECT(*vp));
JS_ASSERT(*vp != JSVAL_VOID);
JS_ASSERT(!JSVAL_IS_VOID(*vp));
clasp = PrimitiveClasses[JSVAL_TAG(*vp) - 1];
obj = js_NewObject(cx, clasp, NULL, NULL, 0);
if (!obj)