Closed
Bug 975412
Opened 12 years ago
Closed 12 years ago
Length property of the (Weak){Map,Set} constructors should be 0
Categories
(Core :: JavaScript: Standard Library, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: fs, Assigned: sankha)
References
Details
Attachments
(1 file)
3.18 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
If I see it correctly, there are some inconsistencies with the length property of Map, Set, WeakMap, WeakSet constructors:
The latest ECMAScript6 specification says they all should be 0:
> Besides the length property (whose value is 0)
Map http://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-constructor
Set http://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-set-constructor
WeakMap http://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-weakmap-constructor
WeakSet
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-weakset-constructor
It looks like it is only correct for WeakMap in Nightly:
Nightly 30.0a1 (2014-02-21) Ubuntu 13.10:
> Map.length
1
> Set.length
1
> WeakMap.length
0
Chromium Version 32.0.1700.107 Ubuntu 13.10:
> Map.length
0
> Set.length
0
> WeakMap.length
0
> WeakSet.length
0
IE 11.0.9600.16428 Win7
> Map.length
1
> Set.length
1
> WeakMap.length
1
Assignee | ||
Comment 1•12 years ago
|
||
This should fix it.
Assignee | ||
Updated•12 years ago
|
Attachment #8379741 -
Flags: review?(jorendorff)
Comment 2•12 years ago
|
||
Comment on attachment 8379741 [details] [diff] [review]
patch v1
Review of attachment 8379741 [details] [diff] [review]:
-----------------------------------------------------------------
Nice.
Attachment #8379741 -
Flags: review?(jorendorff) → review+
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → sankha93
Comment 3•12 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•