On Tue, Sep 10, 2013 at 3:33 PM, <[email protected]> wrote: > ses/* stuff LGTM > > > https://codereview.appspot.**com/13348055/diff/1/src/com/** > google/caja/ses/WeakMap.js<https://codereview.appspot.com/13348055/diff/1/src/com/google/caja/ses/WeakMap.js> > File src/com/google/caja/ses/**WeakMap.js (right): > > https://codereview.appspot.**com/13348055/diff/1/src/com/** > google/caja/ses/WeakMap.js#**newcode374<https://codereview.appspot.com/13348055/diff/1/src/com/google/caja/ses/WeakMap.js#newcode374> > src/com/google/caja/ses/**WeakMap.js:374: if (!(this instanceof > OurWeakMap)) { > Add comment noting that this test is imperfect, in that rare violation > cases will appear legitimate. For example: > > var m = Object.create(WeakMap.**prototype, { > WeakMap: {value: WeakMap} > }).WeakMap(); > > is a violation of the ES6 rule but will be judged legitimate by the > above test. In fact, it is extraordinarily hard to write a perfect test > for this in ES5.
Feel free to take this as a challenge, though probably not in this CL ;). > Since the purpose here is only to catch accident, this > is fine. > > https://codereview.appspot.**com/13348055/diff/1/src/com/** > google/caja/ses/WeakMap.js#**newcode521<https://codereview.appspot.com/13348055/diff/1/src/com/google/caja/ses/WeakMap.js#newcode521> > src/com/google/caja/ses/**WeakMap.js:521: // Be no more lenient than > future ES6 WeakMap > Same comment should be reachable from both, either by copying or by > reference. > > https://codereview.appspot.**com/13348055/<https://codereview.appspot.com/13348055/> > > > -- > > ---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 > google-caja-discuss+**[email protected]<google-caja-discuss%[email protected]> > . > For more options, visit > https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> > . > -- Cheers, --MarkM -- --- 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.
