Bug 26098

Summary: Object.prototype.toString on "arguments" is "[object] Arguments", not "[object] Object"
Product: WebKit Reporter: Matthew Wilson <diakopter>
Component: JavaScriptCoreAssignee: 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
Reported 2009-05-30 14:39:17 PDT
(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
Jeff Walden (remove +bwo to email)
Comment 1 2011-03-16 15:00:05 PDT
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
Comment 2 2011-03-17 10:48:25 PDT
Closing per Jeff's comment
Note You need to log in before you can comment on or make changes to this bug.