trace |new Array|, via the magic of copy and paste

This commit is contained in:
2008-08-21 00:50:20 -07:00
parent e40b71b037
commit d65112e26b
5 changed files with 190 additions and 20 deletions

View File

@@ -2902,8 +2902,8 @@ static JSFunctionSpec array_methods[] = {
JS_FS_END
};
static JSBool
Array(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
JSBool
js_Array(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
jsuint length;
jsval *vector;
@@ -2945,7 +2945,7 @@ js_InitArrayClass(JSContext *cx, JSObject *obj)
js_SlowArrayObjectOps.enumerate = slowarray_enumerate;
js_SlowArrayObjectOps.call = NULL;
proto = JS_InitClass(cx, obj, NULL, &js_ArrayClass, Array, 1,
proto = JS_InitClass(cx, obj, NULL, &js_ArrayClass, js_Array, 1,
array_props, array_methods, NULL, NULL);
/* Initialize the Array prototype object so it gets a length property. */