Remove code for JS_HAS_ARRAY_EXTRAS, and make the extra methods ES5 added to Array.prototype always present. rs=luke
This commit is contained in:
@@ -2607,8 +2607,6 @@ array_slice(JSContext *cx, uintN argc, Value *vp)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
#if JS_HAS_ARRAY_EXTRAS
|
||||
|
||||
static JSBool
|
||||
array_indexOfHelper(JSContext *cx, JSBool isLast, uintN argc, Value *vp)
|
||||
{
|
||||
@@ -2929,7 +2927,6 @@ array_every(JSContext *cx, uintN argc, Value *vp)
|
||||
{
|
||||
return array_extra(cx, EVERY, argc, vp);
|
||||
}
|
||||
#endif
|
||||
|
||||
static JSBool
|
||||
array_isArray(JSContext *cx, uintN argc, Value *vp)
|
||||
@@ -2963,7 +2960,6 @@ static JSFunctionSpec array_methods[] = {
|
||||
JS_FN("concat", array_concat, 1,JSFUN_GENERIC_NATIVE),
|
||||
JS_FN("slice", array_slice, 2,JSFUN_GENERIC_NATIVE),
|
||||
|
||||
#if JS_HAS_ARRAY_EXTRAS
|
||||
JS_FN("indexOf", array_indexOf, 1,JSFUN_GENERIC_NATIVE),
|
||||
JS_FN("lastIndexOf", array_lastIndexOf, 1,JSFUN_GENERIC_NATIVE),
|
||||
JS_FN("forEach", array_forEach, 1,JSFUN_GENERIC_NATIVE),
|
||||
@@ -2973,7 +2969,6 @@ static JSFunctionSpec array_methods[] = {
|
||||
JS_FN("filter", array_filter, 1,JSFUN_GENERIC_NATIVE),
|
||||
JS_FN("some", array_some, 1,JSFUN_GENERIC_NATIVE),
|
||||
JS_FN("every", array_every, 1,JSFUN_GENERIC_NATIVE),
|
||||
#endif
|
||||
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user