Bug 686582 - Begin to specialize ObjectOps::deleteElement to not just delegate to ObjectOps::deleteProperty. r=dvander

This commit is contained in:
Jeff Walden
2011-08-10 14:54:52 -07:00
parent 2d2130f6a4
commit 583a0ae21c
7 changed files with 73 additions and 15 deletions

View File

@@ -920,6 +920,16 @@ js_SuppressDeletedProperty(JSContext *cx, JSObject *obj, jsid id)
return SuppressDeletedPropertyHelper(cx, obj, SingleIdPredicate(id));
}
bool
js_SuppressDeletedElement(JSContext *cx, JSObject *obj, uint32 index)
{
jsid id;
if (!IndexToId(cx, index, &id))
return false;
JS_ASSERT(id == js_CheckForStringIndex(id));
return SuppressDeletedPropertyHelper(cx, obj, SingleIdPredicate(id));
}
class IndexRangePredicate {
jsint begin, end;
public: