https://codereview.appspot.com/226970043/diff/40001/src/com/google/caja/ses/debug.js
File src/com/google/caja/ses/debug.js (right):

https://codereview.appspot.com/226970043/diff/40001/src/com/google/caja/ses/debug.js#newcode71
src/com/google/caja/ses/debug.js:71: Object.setPrototypeOf(err,
FakeError);
On 2015/04/15 22:45:39, kpreid_google wrote:
The above code as well as existing code appears to be part of SES
security.

Yet, file comments say this file is optional. Are the comments wrong?

The comments are correct but obscure. Added clarifying comments. PTAL.

https://codereview.appspot.com/226970043/diff/40001/src/com/google/caja/ses/debug.js#newcode241
src/com/google/caja/ses/debug.js:241: if (!stack || typeof stack !==
'string') { return void 0; }
On 2015/04/15 22:45:39, kpreid_google wrote:
For audit-style-readability, I'd rather see this written as:

if (typeof stack !== 'string' || stack === '')

Done.

https://codereview.appspot.com/226970043/diff/40001/src/com/google/caja/ses/debug.js#newcode340
src/com/google/caja/ses/debug.js:340: typeof (result =
primStackGetter.call(err)) === 'string') {
On 2015/04/15 22:45:39, kpreid_google wrote:
This can return '' where it is otherwise careful to return undefined.
Deliberate?

Done.

https://codereview.appspot.com/226970043/diff/60001/src/com/google/caja/ses/debug.js
File src/com/google/caja/ses/debug.js (right):

https://codereview.appspot.com/226970043/diff/60001/src/com/google/caja/ses/debug.js#newcode28
src/com/google/caja/ses/debug.js:28: * <p>TODO(erights): Explore
alternatives to using "instanceof Error"
Note the added TODO.

https://codereview.appspot.com/226970043/

--

--- 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.

Reply via email to