PTAL
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);
On 2014/08/03 02:28:28, kpreid2 wrote:
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)).
The cache seems like an adequately compelling idea that I went ahead and
implemented it without first measuring performance. PTAL, and let me
know whether you think perf measure is still needed. If so, please
suggest what to measure in order to measure impact on membrane usage.
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))
{
On 2014/08/03 02:28:28, kpreid2 wrote:
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.
Done.
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.