Still not ready for review, but carved away all the spam renamings to make this ...
12 years, 8 months ago
(2013-07-29 14:26:08 UTC)
#4
Still not ready for review, but carved away all the spam renamings to make this
CL manageable. Need to add tests for SES then actually test the additions in
this CL.
On 2013/07/30 01:05:59, MarkM wrote: > How does this enforce that this mitigation is mandatory ...
12 years, 8 months ago
(2013-07-30 02:07:10 UTC)
#8
On 2013/07/30 01:05:59, MarkM wrote:
> How does this enforce that this mitigation is mandatory on those platforms
> suffering from this bug? I see no logic which enforces this.
Sorry, I submitted in haste after finishing the test cases but you're right,
this is still required, as is the removal of some obsolete and/or debug cruft.
Will fix (and do the couple of changes you mentioned) then re-ping. Thanks for
the review so far.
https://codereview.appspot.com/12029043/diff/15002/src/com/google/caja/ses/mitigateGotchas.js File src/com/google/caja/ses/mitigateGotchas.js (right): https://codereview.appspot.com/12029043/diff/15002/src/com/google/caja/ses/mitigateGotchas.js#newcode136 src/com/google/caja/ses/mitigateGotchas.js:136: var parent = parent(scope); Does this run? The scope ...
12 years, 8 months ago
(2013-07-30 18:19:32 UTC)
#10
https://codereview.appspot.com/12029043/diff/31001/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/12029043/diff/31001/src/com/google/caja/ses/repairES5.js#newcode4107 src/com/google/caja/ses/repairES5.js:4107: // TODO(ihab.awad): Build a better system to record problems ...
12 years, 8 months ago
(2013-07-31 05:36:22 UTC)
#15
https://codereview.appspot.com/12029043/diff/31001/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/12029043/diff/31001/src/com/google/caja/ses/repairES5.js#newcode4107 src/com/google/caja/ses/repairES5.js:4107: // TODO(ihab.awad): Build a better system to record problems ...
12 years, 8 months ago
(2013-07-31 05:39:11 UTC)
#16
Ok so it's not clear to me how to make the change just discussed. startSES.js ...
12 years, 8 months ago
(2013-07-31 06:01:33 UTC)
#17
Ok so it's not clear to me how to make the change just discussed.
startSES.js contains the (somewhat jury-rigged) logic to detect problems and
mitigate them when possible.
On the other hand, ses.acceptableProblems is set by caja.js, which is a layer
above the machinery of startSES.js. From the viewpoint of caja.js, the problem
is not "acceptable" because, at its level of abstraction, the problem does not
"exist" at all (it is mitigated away by startSES).
Does that all makes sense? What am I missing?
Ok, more of the puzzle has become clear to me. I now see that caja.js ...
12 years, 8 months ago
(2013-07-31 06:11:21 UTC)
#18
Ok, more of the puzzle has become clear to me.
I now see that caja.js is the one doing the wiring between the "mitigation
frame" and the SES frame. So I guess caja.js can (a) say that problem X is
"acceptable; and (b) wrap mitigateSrcGotchas in a closure that force-sets the
options that turn on the necessary rewriting fixes for problem X. So far so
good.
But how does caja.js *know* that these problems are indeed the case? I guess it
should look at --
tamingWin.ses.es5ProblemReports.INCREMENT_IGNORES_FROZEN.afterFailure
? ... But that would mean that, when SES is initialized ...
tamingWin.ses.ok()
is false. So caja.js would have to have logic that says, ok() is false, but
that's ok.
* * *
Should we perhaps just leave this CL as-is, and defer to a future time the
construction of a clean solution whereby mitigateGotchas can be once and for all
put into the TCB of SES?
On 2013/07/31 06:11:21, ihab.awad wrote: > Ok, more of the puzzle has become clear to ...
12 years, 8 months ago
(2013-07-31 14:35:33 UTC)
#19
On 2013/07/31 06:11:21, ihab.awad wrote:
> Ok, more of the puzzle has become clear to me.
>
> I now see that caja.js is the one doing the wiring between the "mitigation
> frame" and the SES frame. So I guess caja.js can (a) say that problem X is
> "acceptable; and (b) wrap mitigateSrcGotchas in a closure that force-sets the
> options that turn on the necessary rewriting fixes for problem X. So far so
> good.
>
> But how does caja.js *know* that these problems are indeed the case? I guess
it
> should look at --
>
> tamingWin.ses.es5ProblemReports.INCREMENT_IGNORES_FROZEN.afterFailure
>
> ? ... But that would mean that, when SES is initialized ...
>
> tamingWin.ses.ok()
>
> is false. So caja.js would have to have logic that says, ok() is false, but
> that's ok.
>
> * * *
>
> Should we perhaps just leave this CL as-is,
+1. LGTM
> and defer to a future time the
> construction of a clean solution whereby mitigateGotchas can be once and for
all
> put into the TCB of SES?
-1. I still hope to avoid a future in which mitigateGotchas is necessary. But it
is necessary now, so I admit this question is a bit academic at the moment.
Issue 12029043: Mitigate (o.p++) and (o.p += 1) not respecting frozenness in Chrome
(Closed)
Created 12 years, 8 months ago by ihab.awad
Modified 12 years, 7 months ago
Reviewers: kpreid_google, MarkM
Base URL: http://google-caja.googlecode.com/svn/trunk/
Comments: 20