LGTM, please note request for performance measurement


https://codereview.appspot.com/121970043/diff/20001/src/com/google/caja/ses/repairES5.js
File src/com/google/caja/ses/repairES5.js (right):

https://codereview.appspot.com/121970043/diff/20001/src/com/google/caja/ses/repairES5.js#newcode664
src/com/google/caja/ses/repairES5.js:664: var makeStandin =
unsafeEval(makeStandinSrc);
I am concerned about the performance of this wrapper, especially as it
is heavily used in the taming membrane. I'd like to see a rough
measurement of the performance impact on the membrane.

If there is significant impact, consider reducing it by memoizing
makeStandin functions (indexed by parameter count, and, in a future
version, name (per the comment)).

https://codereview.appspot.com/121970043/diff/20001/src/com/google/caja/ses/repairES5.js#newcode674
src/com/google/caja/ses/repairES5.js:674: if (Object.isFrozen(newFunc))
{
At first I was thinking this was redundant, because frozenness and
sealedness are about extensibility + property flags, and the latter is
copied by the above.

However, it does end up applying to any exempt not-already-immutable
properties. It is also useful if a future spec edition (or nonstandard
extension) introduces objects such that freeze does more than setting
non-extensible and modifying properties (e.g. I believe proxies are a
near miss at being such a thing).

Might be worth a comment giving the rationale.

https://codereview.appspot.com/121970043/

--

--- 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/d/optout.

Reply via email to