Bug 28298 - [ES5] Arguments object should inherit from Array
Summary: [ES5] Arguments object should inherit from Array
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-08-14 03:40 PDT by Oliver Hunt
Modified: 2009-08-14 13:19 PDT (History)
1 user (show)

See Also:

Patch v1 (59.39 KB, patch)
2009-08-14 04:35 PDT, Oliver Hunt
no flags Details | Formatted Diff | Diff
Patch v1 (19.28 KB, patch)
2009-08-14 13:07 PDT, Oliver Hunt
barraclough: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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