Bug 380833: AllocSlot now insists on the new slot being already set to void. r=brendan

git-svn-id: svn://10.0.0.236/trunk@226549 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
igor%mir2.org
2007-05-16 22:41:50 +00:00
parent 94be4969d9
commit c51896b2da

View File

@@ -2814,13 +2814,8 @@ js_AllocSlot(JSContext *cx, JSObject *obj, uint32 *slotp)
return JS_FALSE;
}
#ifdef DEBUG
#if JS_BYTES_PER_WORD == 8
STOBJ_SET_SLOT(obj, map->freeslot, (jsval)0xddddddddddddddd8L);
#else
STOBJ_SET_SLOT(obj, map->freeslot, (jsval)0xddddddd8);
#endif
#endif
/* ReallocSlots or js_FreeSlot should set the free slots to void. */
JS_ASSERT(STOBJ_GET_SLOT(obj, map->freeslot) == JSVAL_VOID);
*slotp = map->freeslot++;
return JS_TRUE;
}