https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/apitaming/google.visualization.policyFactory.js
File src/com/google/caja/apitaming/google.visualization.policyFactory.js
(right):

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/apitaming/google.visualization.policyFactory.js#newcode419
src/com/google/caja/apitaming/google.visualization.policyFactory.js:419:
return [ args[0].apply(Object.freeze({}), []) ];
On 2013/10/11 01:16:27, kpreid_google wrote:
Revert this if you agree with my other comments.

Done.

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/plugin/ses-frame-group.js
File src/com/google/caja/plugin/ses-frame-group.js (right):

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/plugin/ses-frame-group.js#newcode114
src/com/google/caja/plugin/ses-frame-group.js:114:
Object.freeze({USELESS: 'USELESS'}),
On 2013/10/11 01:16:27, kpreid_google wrote:
I think this should use a singleton USELESS, because constructing a
frozen
object is more expensive than we want for a single function call.

The rationale explained elsewhere should also be explained here.

Done.

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/plugin/taming-membrane.js
File src/com/google/caja/plugin/taming-membrane.js (right):

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/plugin/taming-membrane.js#newcode40
src/com/google/caja/plugin/taming-membrane.js:40: function
directConstructor(obj) {
On 2013/10/11 01:16:27, kpreid_google wrote:
Maybe document this function, or at least what BASE_OBJECT_CONSTRUCTOR
means?

Done.

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/plugin/taming-membrane.js#newcode94
src/com/google/caja/plugin/taming-membrane.js:94: // then check for
enumerability?
On 2013/10/11 01:16:27, kpreid_google wrote:
This looks equivalent to Object.keys.

Done.

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/plugin/taming-membrane.js#newcode448
src/com/google/caja/plugin/taming-membrane.js:448: // CAUTION: It is
ESSENTIAL that we pass USELESS, not (void 0), when
On 2013/10/11 01:16:27, kpreid_google wrote:
Suggest moving this comment to the definition(s) of USELESS.

Done.

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/plugin/taming-membrane.js#newcode465
src/com/google/caja/plugin/taming-membrane.js:465: var t = function (_)
{
On 2013/10/11 01:16:27, kpreid_google wrote:
should be function(var_args) (no space, that particular arg name),
yes?

Not part of this CL and pervasive.

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/plugin/taming-schema.js
File src/com/google/caja/plugin/taming-schema.js (left):

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/plugin/taming-schema.js#oldcode111
src/com/google/caja/plugin/taming-schema.js:111: if
(privilegedAccess.isDefinedInCajaFrame(f)) {
On 2013/10/11 01:16:27, kpreid_google wrote:
Why is this constraint no longer needed?

There is now no foundational difference between objects anywhere, and we
may choose to use Caja in a mode where we bundle the taming and guest
code into the same frame.

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/plugin/taming-schema.js
File src/com/google/caja/plugin/taming-schema.js (right):

https://codereview.appspot.com/14605043/diff/1/src/com/google/caja/plugin/taming-schema.js#newcode202
src/com/google/caja/plugin/taming-schema.js:202: return p(self,
advice.apply((void 0), [f, self, args]));
On 2013/10/11 01:16:27, kpreid_google wrote:
Does this (and the 2 below) even need to be apply instead of a plain
function
call?

Done.

https://codereview.appspot.com/14605043/diff/1/tests/com/google/caja/plugin/test-defensible-objects.js
File tests/com/google/caja/plugin/test-defensible-objects.js (right):

https://codereview.appspot.com/14605043/diff/1/tests/com/google/caja/plugin/test-defensible-objects.js#newcode38
tests/com/google/caja/plugin/test-defensible-objects.js:38:
assertEquals('USELESS', this.USELESS);
Sigh.

I started this CL hoping to Bobbitt the whole idea of USELESS once and
for good. I failed. I then figured, well at least we should not have
this thing that we pass around all over tarnation. Looking back at the
carnage, I guess that was a ... um ... USELESS goal. :P

https://codereview.appspot.com/14605043/

--

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

Reply via email to