Bug 404755: fixing memory leak resulted from bug 363603. a,r=brendan

This commit is contained in:
igor@mir2.org 2007-11-28 14:22:40 -08:00
Родитель cde1accb1a
Коммит d1174f4fdd
1 изменённых файлов: 2 добавлений и 0 удалений

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

@ -2944,6 +2944,8 @@ js_FreeSlot(JSContext *cx, JSObject *obj, uint32 slot)
JS_ASSERT(!MAP_IS_NATIVE(map) || ((JSScope *)map)->object == obj);
LOCKED_OBJ_SET_SLOT(obj, slot, JSVAL_VOID);
if (map->freeslot == slot + 1) {
map->freeslot = slot;
/* When shrinking ReallocSlots always returns true. */
ReallocSlots(cx, obj, slot, JS_FALSE);
}