http://codereview.appspot.com/4701044/diff/13001/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right):
http://codereview.appspot.com/4701044/diff/13001/src/com/google/caja/es53.js#newcode4788 src/com/google/caja/es53.js:4788: names.filter(filter) : Is filter virtualized? http://codereview.appspot.com/4701044/diff/13001/src/com/google/caja/es53.js#newcode4840 src/com/google/caja/es53.js:4840: validateHandler(handler); Is this validation in the spec? It doesn't actually provide any hard safety, since a handler could mutate itself after validation so that it would no longer validate. But this still may be a good idea for catching bugs early. If so, perhaps some way to issue a warning or make the validation optional or something? At least a comment to explain why we're deviating from the spec? OTOH, for the sake of our own implementation limitation gotcha, we do need to validate that proto and all objects it inherits from are not proxies and are not extensible. http://codereview.appspot.com/4701044/diff/13001/src/com/google/caja/es53.js#newcode4841 src/com/google/caja/es53.js:4841: var proxy = {}; proxy must inherit from proto. http://codereview.appspot.com/4701044/diff/13001/src/com/google/caja/es53.js#newcode4852 src/com/google/caja/es53.js:4852: if ('get_v___' in handler) { No, you musn't test cajole('get' in handler) to test the presence of the get trap, or you break the double lifting trick. Rather, you should test the value of cajole(handler.get), IIRC, to see whether it's callable. If so, then the get trap is considered present and you trap to it. Otherwise you use the default. This problem is repeated below. http://codereview.appspot.com/4701044/diff/13001/src/com/google/caja/es53.js#newcode4853 src/com/google/caja/es53.js:4853: return (handler.get_m___ === handler ? Another mistaken formulation of the _m___ fastpath. Please recheck the whole file. I see other occurrences of this problem. http://codereview.appspot.com/4701044/
