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
parent 3445dfe8
......@@ -196,10 +196,7 @@ $Object.prototype.constructor = $Object;
// ECMA-262 - 15.2.4.2
function ObjectToString() {
var c = %_ClassOf(this);
// Hide Arguments from the outside.
if (c === 'Arguments') c = 'Object';
return "[object " + c + "]";
return "[object " + %_ClassOf(this) + "]";
}
......
......@@ -48,9 +48,9 @@ function F(f) {
assertEquals("[object global]", eval("f()"));
// Receiver should be the arguments object here.
assertEquals("[object Object]", eval("arguments[0]()"));
assertEquals("[object Arguments]", eval("arguments[0]()"));
with (arguments) {
assertEquals("[object Object]", toString());
assertEquals("[object Arguments]", toString());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment