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

This commit is contained in:
igor@mir2.org 2007-05-16 15:41:50 -07:00
Родитель f1cc12e174
Коммит a5ceb3aaa6
1 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

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