[Bug 12404] Structured Clone and Arrays (implementation notes and clarifications sought)

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12404

Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bzbarsky@mit.edu

--- Comment #2 from Boris Zbarsky <bzbarsky@mit.edu> 2011-03-31 13:51:58 UTC ---
Indeed.  In particular, the given description of clarification 2 is manifestly
incorrect, as it doesn't differentiate between these two arrays:

 ["zero", "one", undefined, undefined]
 ["zero", "one", , , ]

which are both arrays of length 4; the former is dense but the latter is
sparse.

That said, I believe that this part of the behavior is correct, given what the
spec says right now: the second array above, as well as the array in your
example, only has two enumerable properties: "0" and "1".  I agree that for
arrays it would make sense to clone the length as well, even though it's not
enumerable.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 31 March 2011 13:52:04 UTC