Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(105)

Issue 4535118: Port Domita to ECMAScript 5 as "Domado". (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 5 months ago by kpreid2
Modified:
15 years, 3 months ago
Reviewers:
Mark S. Miller, MikeSamuel, tvcutsem, MarkM, metaweta
CC:
google-caja-discuss_googlegroups.com, ihab.awad, tvcutsem_gmail.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Domado is a straight port of Domita, but written in pure ECMAScript 5 code; it is run cajoled under ES5/3. It is designed to also be capable of running in a pure SES environment, using strictly ES5 features to defend itself. In order to support being cajoled and not having privileged access, Domado does not use any ___ properties internally (replacing them with WeakMaps) or externally (replacing them with separate objects providing privileged access). HtmlEmitter and Bridal have necessarily been ported in the same way.

Patch Set 1 #

Patch Set 2 : Port Domita to ECMAScript 5 as "Domado". #

Total comments: 8

Patch Set 3 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 4 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 5 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 6 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 7 : Port Domita to ECMAScript 5 as "Domado". #

Total comments: 20

Patch Set 8 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 9 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 10 : Port Domita to ECMAScript 5 as "Domado". #

Total comments: 50

Patch Set 11 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 12 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 13 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 14 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 15 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 16 : Port Domita to ECMAScript 5 as "Domado". #

Total comments: 87

Patch Set 17 : Port Domita to ECMAScript 5 as "Domado". #

Total comments: 4

Patch Set 18 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 19 : Port Domita to ECMAScript 5 as "Domado". #

Total comments: 3

Patch Set 20 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 21 : Port Domita to ECMAScript 5 as "Domado". #

Total comments: 13

Patch Set 22 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 23 : Port Domita to ECMAScript 5 as "Domado". #

Patch Set 24 : Port Domita to ECMAScript 5 as "Domado". #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6055 lines, -5028 lines) Patch
M build.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 11 chunks +43 lines, -18 lines 0 comments Download
M experimental/gadgy/container.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M experimental/widgettest/container.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M src/com/google/caja/demos/playground/es53.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +165 lines, -17 lines 0 comments Download
M src/com/google/caja/domita/package-info.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/es53.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +2 lines, -7 lines 0 comments Download
M src/com/google/caja/plugin/bridal.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 27 chunks +106 lines, -55 lines 0 comments Download
M src/com/google/caja/plugin/caja.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 12 chunks +201 lines, -26 lines 0 comments Download
A src/com/google/caja/plugin/capture-domado.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +73 lines, -0 lines 0 comments Download
A src/com/google/caja/plugin/domado.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +5373 lines, -0 lines 0 comments Download
D src/com/google/caja/plugin/domita.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -4840 lines 0 comments Download
M src/com/google/caja/plugin/html-emitter.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 11 chunks +31 lines, -22 lines 0 comments Download
M src/com/google/caja/ses/repairES5.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +13 lines, -2 lines 0 comments Download
M tests/com/google/caja/plugin/browser-test-case.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4 chunks +13 lines, -12 lines 0 comments Download
M tests/com/google/caja/plugin/container.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -1 line 0 comments Download
M tests/com/google/caja/plugin/domita_test.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M tests/com/google/caja/plugin/es53-test-cajajs-invocation.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M tests/com/google/caja/plugin/es53-test-domita-canvas-guest.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M tests/com/google/caja/plugin/es53-test-domita-dom-guest.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +11 lines, -7 lines 0 comments Download
M tests/com/google/caja/plugin/es53-test-domita-special.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M tests/com/google/caja/plugin/html-emitter-test.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/js/jqueryjs/runtest/env.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +12 lines, -13 lines 0 comments Download
M yuitest/yahoo_dom_host.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 25
kpreid2
15 years, 5 months ago (2011-06-03 01:11:20 UTC) #1
MarkM
By no means comprehensive. Just some things I spotted. http://codereview.appspot.com/4535118/diff/2001/src/com/google/caja/es5-guards.js File src/com/google/caja/es5-guards.js (right): http://codereview.appspot.com/4535118/diff/2001/src/com/google/caja/es5-guards.js#newcode40 src/com/google/caja/es5-guards.js:40: ...
15 years, 5 months ago (2011-06-06 06:22:21 UTC) #2
kpreid1
On Jun 5, 2011, at 23:22, erights@gmail.com wrote: > By no means comprehensive. Just some ...
15 years, 5 months ago (2011-06-06 14:02:07 UTC) #3
MikeSamuel
Some initial comments but still much more to look at. http://codereview.appspot.com/4535118/diff/17001/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): http://codereview.appspot.com/4535118/diff/17001/src/com/google/caja/es53.js#newcode2339 ...
15 years, 4 months ago (2011-06-24 18:21:09 UTC) #4
kpreid2
http://codereview.appspot.com/4535118/diff/17001/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): http://codereview.appspot.com/4535118/diff/17001/src/com/google/caja/es53.js#newcode2339 src/com/google/caja/es53.js:2339: * {@code typename} is used for toString and {@code ...
15 years, 4 months ago (2011-06-25 00:32:20 UTC) #5
MikeSamuel
I'm holding off on reviewing the files in the draft and experimental directories since I ...
15 years, 4 months ago (2011-07-06 20:48:27 UTC) #6
metaweta
http://codereview.appspot.com/4535118/diff/21003/src/com/google/caja/es5-guards.js File src/com/google/caja/es5-guards.js (right): http://codereview.appspot.com/4535118/diff/21003/src/com/google/caja/es5-guards.js#newcode30 src/com/google/caja/es5-guards.js:30: // SES. On 2011/07/06 20:48:27, MikeSamuel wrote: > Mike ...
15 years, 4 months ago (2011-07-06 22:45:43 UTC) #7
kpreid2
Oops! I thought I had published these comments long ago! http://codereview.appspot.com/4535118/diff/21003/src/com/google/caja/demos/playground/es53.html File src/com/google/caja/demos/playground/es53.html (right): http://codereview.appspot.com/4535118/diff/21003/src/com/google/caja/demos/playground/es53.html#newcode57 ...
15 years, 4 months ago (2011-07-13 00:24:09 UTC) #8
MikeSamuel
http://codereview.appspot.com/4535118/diff/21003/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): http://codereview.appspot.com/4535118/diff/21003/src/com/google/caja/plugin/domado.js#newcode60 src/com/google/caja/plugin/domado.js:60: var PLACEHOLDER_theTools; // TODO(kpreid): This is a placeholder for ...
15 years, 3 months ago (2011-07-18 21:57:00 UTC) #9
kpreid2
http://codereview.appspot.com/4535118/diff/21003/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): http://codereview.appspot.com/4535118/diff/21003/src/com/google/caja/plugin/domado.js#newcode60 src/com/google/caja/plugin/domado.js:60: var PLACEHOLDER_theTools; // TODO(kpreid): This is a placeholder for ...
15 years, 3 months ago (2011-07-20 00:26:47 UTC) #10
MikeSamuel
http://codereview.appspot.com/4535118/diff/21003/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): http://codereview.appspot.com/4535118/diff/21003/src/com/google/caja/plugin/domado.js#newcode60 src/com/google/caja/plugin/domado.js:60: var PLACEHOLDER_theTools; // TODO(kpreid): This is a placeholder for ...
15 years, 3 months ago (2011-07-21 18:16:16 UTC) #11
kpreid2
http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js#newcode520 src/com/google/caja/plugin/domado.js:520: TameXHRConf.confide(this); On 2011/07/21 18:16:17, MikeSamuel wrote: > I'm confused. ...
15 years, 3 months ago (2011-07-21 19:31:05 UTC) #12
MikeSamuel
http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js#newcode1061 src/com/google/caja/plugin/domado.js:1061: * map is never used with more than one ...
15 years, 3 months ago (2011-07-21 19:54:46 UTC) #13
kpreid2
http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js#newcode2386 src/com/google/caja/plugin/domado.js:2386: TameBackedNode.prototype.dispatchEvent = nodeMethod(function dispatchEvent(evt) { On 2011/07/21 19:54:46, MikeSamuel ...
15 years, 3 months ago (2011-07-21 20:21:46 UTC) #14
Mark S. Miller
[+tvcutsem] On Thu, Jul 21, 2011 at 11:16 AM, <mikesamuel@gmail.com> wrote: > > http://codereview.appspot.com/**4535118/diff/44001/src/com/** > ...
15 years, 3 months ago (2011-07-21 20:47:07 UTC) #15
MikeSamuel
I looked over the test changes again. I'm pretty happy where this is and think ...
15 years, 3 months ago (2011-07-25 15:38:47 UTC) #16
kpreid2
The latest snapshot also includes the <script> security fixes and adjustments for compatibility with ES5/3's ...
15 years, 3 months ago (2011-07-26 01:15:46 UTC) #17
MikeSamuel
LGTM
15 years, 3 months ago (2011-07-26 12:55:41 UTC) #18
MikeSamuel
15 years, 3 months ago (2011-07-29 00:26:05 UTC) #19
MikeSamuel
http://codereview.appspot.com/4535118/diff/61001/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): http://codereview.appspot.com/4535118/diff/61001/src/com/google/caja/plugin/domado.js#newcode66 src/com/google/caja/plugin/domado.js:66: // autoswitches as needed, remapping to the (name[, value], ...
15 years, 3 months ago (2011-07-29 00:26:24 UTC) #20
kpreid2
http://codereview.appspot.com/4535118/diff/61001/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): http://codereview.appspot.com/4535118/diff/61001/src/com/google/caja/plugin/domado.js#newcode66 src/com/google/caja/plugin/domado.js:66: // autoswitches as needed, remapping to the (name[, value], ...
15 years, 3 months ago (2011-07-29 00:41:56 UTC) #21
Mark S. Miller
http://codereview.appspot.com/4535118/diff/61001/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): http://codereview.appspot.com/4535118/diff/61001/src/com/google/caja/plugin/domado.js#newcode66 src/com/google/caja/plugin/domado.js:66: // autoswitches as needed, remapping to the (name[, value], ...
15 years, 3 months ago (2011-07-29 01:46:33 UTC) #22
MikeSamuel
As discussed verbally, will punt on fleshing out writeln testcases to another CL. LGTM.
15 years, 3 months ago (2011-07-29 17:56:13 UTC) #23
kpreid2
Committed as r4576.
15 years, 3 months ago (2011-07-29 18:27:20 UTC) #24
tvcutsem_vub.ac.be
15 years, 3 months ago (2011-08-11 11:20:56 UTC) #25
> [+tvcutsem]
> 
> On Thu, Jul 21, 2011 at 11:16 AM, <mikesamuel@gmail.com> wrote:
> 
>
http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/d...
> src/com/google/caja/plugin/domado.js:348:
> ExpandoProxyHandler.prototype.getOwnPropertyDescriptor = function (name) {
> On 2011/07/20 00:26:48, kpreid2 wrote:
> On 2011/07/18 21:57:01, MikeSamuel wrote:
> > Are these name parameters guaranteed to be coerced to strings or numbers
> > before reaching the proxy handler?
> 
> I would expect so. ES5 semantics have the property name in an ordinary
foo[bar]
> coerced to string well before any internal methods of foo are invoked. But the
> final arbiter would have to be the semantics of proxies, which don't seem to
be
> written down on ES Wiki.
> 
> MarkM would be the person to consult for this.
> 
> Mark, is that correct?
> 
> It's correct. I suspect it is captured somewhere on the proxies semantics
pages, but will check later. We have talked about changing it and rejected that
plan, at least for now, which is why I'm fairly confident that it's always a
string.
> 
> cc'ed Tom. Tom?

Yes, name parameters are coerced to strings (not numbers) before the trap is
invoked. It's implicit in the Proxies spec, by means of the [[Get]] built-in
method, which can only take a property name as an argument.

Details at
<http://wiki.ecmascript.org/doku.php?id=harmony:proxies_semantics#detailed_sem...>

Kind regards,
Tom
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b