R=rossberg@chromium.org
TEST=mjsunit/apply,test262
Review URL: http://codereview.chromium.org/8342034
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9709
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
}
// Make sure the arguments list has the right type.
- if (args != null && !IS_ARRAY(args) && !IS_ARGUMENTS(args)) {
+ if (args != null && !IS_SPEC_OBJECT(args)) {
throw %MakeTypeError('apply_wrong_args', []);
}
"moreseper-prime");
delete(Array.prototype["1"]);
+
+// Check correct handling of non-array argument lists.
+assertSame(this, f0.apply(this, {}), "non-array-1");
+assertSame(this, f0.apply(this, { length:1 }), "non-array-2");
+assertEquals(void 0, f1.apply(this, { length:1 }), "non-array-3");
+assertEquals(void 0, f1.apply(this, { 0:"foo" }), "non-array-4");
+assertEquals("foo", f1.apply(this, { length:1, 0:"foo" }), "non-array-5");
# 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step
# 4)
15.2.3.7-6-a-285: FAIL
-# Bug? Strict Mode - 'this' value is a string which cannot be converted to
-# wrapper objects when the function is called with an array of arguments
-15.3.4.3-1-s: FAIL
-# Bug? Strict Mode - 'this' value is a number which cannot be converted to
-# wrapper objects when the function is called with an array of arguments
-15.3.4.3-2-s: FAIL
-# Bug? Strict Mode - 'this' value is a boolean which cannot be converted to
-# wrapper objects when the function is called with an array of arguments
-15.3.4.3-3-s: FAIL
# Bug? Array.prototype.indexOf - decreasing length of array does not delete
# non-configurable properties
15.4.4.14-9-a-19: FAIL