Bug 26098
| Summary: | Object.prototype.toString on "arguments" is "[object] Arguments", not "[object] Object" | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Matthew Wilson <diakopter> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | ggaren, jwalden+bwo, oliver |
| Priority: | P3 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| URL: | javascript:(function(){alert(Object.prototype.toString.call(arguments))})(1,2,3) | ||
Matthew Wilson
(function(){alert(Object.prototype.toString.call(arguments))})(1,2,3) in Webkit gives "[object] Arguments", but in every other JavaScript implementation it's [object] Object
I'm using r44164 on 528.17 on vista sp2 x64.
see this thread for some background and Brendan Eich's comments: https://mail.mozilla.org/pipermail/es-discuss/2009-February/008898.html
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Jeff Walden (remove +bwo to email)
I'm assuming you meant "[object Arguments]" and "[object Object]" for those.
ES5 now specifies the [[Class]] of arguments objects is "Arguments", so WebKit now has the correct behavior. I'll leave it to someone actually hacking on JSC to resolve this as the correct behavior.
Oliver Hunt
Closing per Jeff's comment