Bug 686582 - Begin to specialize ObjectOps::setElementAttributes to not just delegate to ObjectOps::setAttributes. r=dvander
This commit is contained in:
@@ -1011,18 +1011,15 @@ array_getElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *at
|
||||
static JSBool
|
||||
array_setAttributes(JSContext *cx, JSObject *obj, jsid id, uintN *attrsp)
|
||||
{
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
|
||||
JSMSG_CANT_SET_ARRAY_ATTRS);
|
||||
return JS_FALSE;
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_CANT_SET_ARRAY_ATTRS);
|
||||
return false;
|
||||
}
|
||||
|
||||
static JSBool
|
||||
array_setElementAttributes(JSContext *cx, JSObject *obj, uint32 index, uintN *attrsp)
|
||||
{
|
||||
jsid id;
|
||||
if (!IndexToId(cx, index, &id))
|
||||
return false;
|
||||
return array_setAttributes(cx, obj, id, attrsp);
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_CANT_SET_ARRAY_ATTRS);
|
||||
return false;
|
||||
}
|
||||
|
||||
namespace js {
|
||||
|
||||
Reference in New Issue
Block a user