JM: OOL fast path for setting array holes, bug 580355

This commit is contained in:
Brian Hackett
2010-07-28 13:07:26 -07:00
parent 74d808711e
commit dbeb8b3951
5 changed files with 86 additions and 4 deletions

View File

@@ -811,7 +811,8 @@ array_setProperty(JSContext *cx, JSObject *obj, jsid id, Value *vp)
if (!obj->isDenseArray())
return js_SetProperty(cx, obj, id, vp);
if (!js_IdIsIndex(id, &i) || INDEX_TOO_SPARSE(obj, i)) {
if (!js_IdIsIndex(id, &i) || js_PrototypeHasIndexedProperties(cx, obj) ||
INDEX_TOO_SPARSE(obj, i)) {
if (!obj->makeDenseArraySlow(cx))
return JS_FALSE;
return js_SetProperty(cx, obj, id, vp);