Bug 404755 - fixing memory leak resulted from bug 363603 [p=igor@mir2.org (Igor Bukanov) r+a1.9=brendan]

git-svn-id: svn://10.0.0.236/trunk@240086 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com
2007-11-29 06:00:10 +00:00
parent 5e7c1fd748
commit f41a3969d8

View File

@@ -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);
}