Modulo the names[i] problem below, LGTM.
http://codereview.appspot.com/4701044/diff/49002/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): http://codereview.appspot.com/4701044/diff/49002/src/com/google/caja/es53.js#newcode4924 src/com/google/caja/es53.js:4924: assertValidPropertyName(names[i]); This still has the double use of "names[i]" problem. Also, we're not even coercing the validated value to a string first, so the evil handler could give us a var str = 'valid'; var sneaky = { toString() { var result = str; str = 'evil__'; return result; } }; sneaky object as names[i]. http://codereview.appspot.com/4701044/diff/49002/src/com/google/caja/es53.js#newcode4944 src/com/google/caja/es53.js:4944: result.push('' + names[i]); Exactly, yes. http://codereview.appspot.com/4701044/
