https://codereview.appspot.com/10181043/diff/27001/src/com/google/caja/ses/repairES5.js
File src/com/google/caja/ses/repairES5.js (right):
https://codereview.appspot.com/10181043/diff/27001/src/com/google/caja/ses/repairES5.js#newcode3382
src/com/google/caja/ses/repairES5.js:3382: } else if (typeof
ses.mitigateSrcGotchas === 'function') {
On 2013/07/06 20:34:11, MarkM wrote:
Unfortunately, at this point in the initialization process
ses.mitigateSrcGotchas is not yet initialized. What is the right way
to
fix Caja so this is already initialized by the time we get here?
The hookup of mitigateSrcGotchas is in caja.js, function trySES, and in
ses-frame-group.js.
If you need to supply the mitigator before initSES runs then the thing
to do would be to move it into the frameInit function inside trySES,
which is already concerned with configuring SES. This will require
moving the sesMaker inside of the utility-frame loading, which will
cause the two frame loads to be serial rather than parallel network
requests, which is unfortunate.
Therefore I recommend you avoid needing this dependency; if it is
unavoidable, then perhaps you can add a configuration flag that
mitigateSrcGotchas _will be available_, and supply the actual mitigator
in the current way (with inconsistency a fatal error)?
(That last suggestion is basically "supply a promise for the mitigator",
except that we don't have promises at this stage.)
A third option would be to make initSES take no action (including no
repairs) until a function is invoked with the mitigator as a parameter;
basically removing hookupSES and making repairES5 invoked by startSES().
But that's a radical change.
https://codereview.appspot.com/10181043/
--
---
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.