Bug 28298

Summary: [ES5] Arguments object should inherit from Array
Product: WebKit Reporter: Oliver Hunt <oliver>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch v1
none
Patch v1 barraclough: review+

Description Oliver Hunt 2009-08-14 03:40:47 PDT
ES5 says that the Arguments should inherit from array (Section 10.6).  Specifically that construction of the Arguments object is as follows (assuming Object and Array are the standard builtin Object and Array objects, and that their prototypes are unchanged):

obj = new Object with the class Arguments
obj.__proto__ = Array.prototype
obj.constructor = Object
obj.toString = Object.prototype.toString
obj.toLocalString = Object.prototype.toLocaleString
Comment 1 Oliver Hunt 2009-08-14 04:35:56 PDT
Created attachment 34826 [details]
Patch v1
Comment 2 Gavin Barraclough 2009-08-14 13:01:44 PDT
You seem to be checking in another mozilla test failing?  If so, is this intentional, could you not just fix the test?
Comment 3 Oliver Hunt 2009-08-14 13:02:27 PDT
I suppose i could do that...
Comment 4 Oliver Hunt 2009-08-14 13:07:58 PDT
Created attachment 34869 [details]
Patch v1
Comment 5 Oliver Hunt 2009-08-14 13:08:19 PDT
Gavin i has fixed it
Comment 6 Oliver Hunt 2009-08-14 13:19:36 PDT
Committed r47292