[Bug 29004] FrozenArray only provides shallow immutability

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29004

--- Comment #3 from Boris Zbarsky <bzbarsky@mit.edu> ---
Dictionaries are returned by value, not by reference, so there is no need to
freeze them when returning them normally.

The corresponding situation for an array is a sequence return value, which
likewise never needs to be frozen.

The frozen thing is for when you want to keep returning the same object each
time but don't want the caller to be able to modify it.  We can already do that
with some IDL interface which has only getters and no setters; the problem is
that such things don't play along well with other things people want to do with
their arrays (concat, map, filter, etc).  We _could_ enable IDL interfaces that
do all that more sanely, or we could just use actual Array objects... the
FrozenArray approach is the latter.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Friday, 31 July 2015 18:12:24 UTC