https://codereview.appspot.com/54750043/diff/20001/src/com/google/caja/ses/WeakMap.js
File src/com/google/caja/ses/WeakMap.js (right):
https://codereview.appspot.com/54750043/diff/20001/src/com/google/caja/ses/WeakMap.js#newcode313
src/com/google/caja/ses/WeakMap.js:313: var hiddenRecord =
Object.create(null);
On 2014/01/21 18:13:15, kpreid2 wrote:
Note that Object.create(null) is not available on Chrome versions near
28.0.1480.0 due to the __proto__ breakage.
If this is still a concern, we must be able to fall back to a regular
{} here.
If it is obsolete, then we should (separately) remove all of the
kludges that
were added in r5359.
Done.
https://codereview.appspot.com/54750043/diff/20001/src/com/google/caja/ses/WeakMap.js#newcode426
src/com/google/caja/ses/WeakMap.js:426: function delete___(key) {
On 2014/01/21 18:13:15, kpreid2 wrote:
Note that per ES6-draft this should return whether the key originally
existed.
The previous implementation returned true always and this one is
inconsistent.
We should start having tests for WeakMap; it would be reasonable to
add them to
test-ses-parts.js for now.
Since this is based on Kris's weak-map, I'm checking with him at
https://github.com/drses/weak-map/issues/5 and will revise accordingly.
But your diagnosis seems correct.
https://codereview.appspot.com/54750043/diff/20001/src/com/google/caja/ses/WeakMap.js#newcode431
src/com/google/caja/ses/WeakMap.js:431: return keys.indexOf(key) >= 0;
On 2014/01/21 18:13:15, kpreid2 wrote:
This doesn't implement any deletion; it appears to be a copy of
has___.
Please add a test that would have caught this bug.
Since this is based on Kris's weak-map, I'm checking with him at
https://github.com/drses/weak-map/issues/5 and will revise accordingly.
But your diagnosis seems correct.
https://codereview.appspot.com/54750043/
--
---
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.