On 2013/10/25 21:21:41, ihab.awad wrote:
I recommend we copy every time, consistent with all other arrays. If
we find
later that we need to revisit, we can revisit for all arrays.

Done; see new snapshot. Note a small change to the semantics of the
taming membrane: in order to avoid testing for N kinds of objects before
checking the feralByTame/tameByFeral maps, I have moved that check
first. This means that if tamesTo is applied to an array object (on
either side) it will now have an effect where it did not before. I see
no harm in this.

I have also refactored the taming membrane code to reduce duplication in
array processing.

The copying of arrays is an artifact of ES5/3 --

* ES5/3 forced us to always have distinct tame-side vs. feral-side
objects
because the tame-side objects must have the "___" properties and the
feral-side
objects should not be polluted by them;

Even in ES5+WeakMaps+proxies we still must have distinct feral-side
objects: a guest function must not be given any feral object (due to
mutable/powerful prototypes) and so the feral side must be given
argument-taming wrappers for guest functions.


https://codereview.appspot.com/12801043/

--

--- You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to