mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 467499 - Pass the proper size argument to ResizeSlots. r=shaver/crowder
This commit is contained in:
parent
48281a796f
commit
500f0a0301
@ -580,7 +580,9 @@ array_length_setter(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
}
|
||||
|
||||
if (OBJ_IS_DENSE_ARRAY(cx, obj)) {
|
||||
if (ARRAY_DENSE_LENGTH(obj) && !ResizeSlots(cx, obj, oldlen, newlen))
|
||||
/* Don't reallocate if we're not actually shrinking our slots. */
|
||||
jsuint oldsize = ARRAY_DENSE_LENGTH(obj);
|
||||
if (oldsize >= newlen && !ResizeSlots(cx, obj, oldsize, newlen))
|
||||
return JS_FALSE;
|
||||
} else if (oldlen - newlen < (1 << 24)) {
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user