https://codereview.appspot.com/258110043/diff/1/src/com/google/caja/ses/startSES.js
File src/com/google/caja/ses/startSES.js (right):
https://codereview.appspot.com/258110043/diff/1/src/com/google/caja/ses/startSES.js#newcode263
src/com/google/caja/ses/startSES.js:263: * the time of this writing,
with TRY_GLOBAL_SIMPLE_FREEZE_FIRST
Say "as of 2015-08-05" instead of "at the time of this writing". (The
information is of course available through history, but giving a
timestamp makes staleness instantly understandable.)
https://codereview.appspot.com/258110043/diff/1/src/com/google/caja/ses/startSES.js#newcode1523
src/com/google/caja/ses/startSES.js:1523: * Although, in the official
spec language, only objects are
I suggest swapping these two sentences and putting the new second one in
parentheses. This way, the comment begins with what it's actually about.
https://codereview.appspot.com/258110043/diff/1/src/com/google/caja/ses/startSES.js#newcode1533
src/com/google/caja/ses/startSES.js:1533: * the EcmaScript notion of
"global object" is split into two
capitalization: "ECMAScript"
Do you mean to say it is split _in browsers_ into ...?
https://codereview.appspot.com/258110043/diff/1/src/com/google/caja/ses/startSES.js#newcode1535
src/com/google/caja/ses/startSES.js:1535: * from one url to another, a
fresh realm (set of primordials) is
"URL"
https://codereview.appspot.com/258110043/diff/1/src/com/google/caja/ses/startSES.js#newcode1597
src/com/google/caja/ses/startSES.js:1597: *
<tt>Object.defineProperty</tt>.
use <code> not <tt> (here and below).
https://codereview.appspot.com/258110043/diff/1/src/com/google/caja/ses/startSES.js#newcode1658
src/com/google/caja/ses/startSES.js:1658: // Might be specced, simple,
legacy, or mized
Can be one sentence per line. Rewrap so it is.
https://codereview.appspot.com/258110043/diff/1/src/com/google/caja/ses/startSES.js#newcode1667
src/com/google/caja/ses/startSES.js:1667: if ('document' in global) {
Extract this test into a function returning boolean, so it's less likely
to be reinvented or copied, and the comments on how it's a bad test can
go in there and not distract from what this is doing.
https://codereview.appspot.com/258110043/diff/1/src/com/google/caja/ses/startSES.js#newcode1729
src/com/google/caja/ses/startSES.js:1729: * <p>Since we can't use
getOwnPropertyDescriptor to see if we
Explain why we can't, at least as "See comments on freezeGlobalProp".
https://codereview.appspot.com/258110043/diff/1/src/com/google/caja/ses/startSES.js#newcode1736
src/com/google/caja/ses/startSES.js:1736: if (!(ses.is(oldValue,
desc.value))) {
This will give a false negative if the property's value is undefined.
This will throw an unhelpful error if the property does not exist
(because desc is not an object).
Parentheses are unnecessary.
https://codereview.appspot.com/258110043/diff/1/src/com/google/caja/ses/startSES.js#newcode1806
src/com/google/caja/ses/startSES.js:1806: var newDesc = {
Inline this literal into the defProp statement below, so that it can be
read in context of it being the descriptor for sharedImports.
https://codereview.appspot.com/258110043/
--
---
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.