mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
Bug 484750 - Assertion failure: newlen == 0 || obj->dslots[newlen - 1] != JSVAL_HOLE, at ../jsarray.cpp. Modify an assertion to properly handle intentional fenceposting behavior where we copy 0 elements to the end of an array -- can't assert that the end of the array isn't a hole in this case because we're intentionally not changing the array from what it was before -- demonstrated by [,].splice(1). r=me as obvious from debugging the testcase
This commit is contained in:
parent
4efdc2378b
commit
6f7d355335
@ -1600,7 +1600,7 @@ InitArrayElements(JSContext *cx, JSObject *obj, jsuint start, jsuint count, jsva
|
||||
|
||||
JS_ASSERT(count < size_t(-1) / sizeof(jsval));
|
||||
memcpy(obj->dslots + start, vector, sizeof(jsval) * count);
|
||||
JS_ASSERT(newlen == 0 || obj->dslots[newlen - 1] != JSVAL_HOLE);
|
||||
JS_ASSERT_IF(count != 0, obj->dslots[newlen - 1] != JSVAL_HOLE);
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user