Remove special-case for arguments.toString to match ES5
Patch by Jan de Mooij <jandemooij@gmail.com> Review: http://codereview.chromium.org/273073 Review URL: http://codereview.chromium.org/389008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
3445dfe827
commit
5d4d5944dd
@ -196,10 +196,7 @@ $Object.prototype.constructor = $Object;
|
|||||||
|
|
||||||
// ECMA-262 - 15.2.4.2
|
// ECMA-262 - 15.2.4.2
|
||||||
function ObjectToString() {
|
function ObjectToString() {
|
||||||
var c = %_ClassOf(this);
|
return "[object " + %_ClassOf(this) + "]";
|
||||||
// Hide Arguments from the outside.
|
|
||||||
if (c === 'Arguments') c = 'Object';
|
|
||||||
return "[object " + c + "]";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ function F(f) {
|
|||||||
assertEquals("[object global]", eval("f()"));
|
assertEquals("[object global]", eval("f()"));
|
||||||
|
|
||||||
// Receiver should be the arguments object here.
|
// Receiver should be the arguments object here.
|
||||||
assertEquals("[object Object]", eval("arguments[0]()"));
|
assertEquals("[object Arguments]", eval("arguments[0]()"));
|
||||||
with (arguments) {
|
with (arguments) {
|
||||||
assertEquals("[object Object]", toString());
|
assertEquals("[object Arguments]", toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user