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

Issue 11778043: Make startSES aware of accessor properties. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 7 months ago by kpreid_google
Modified:
12 years, 7 months ago
Reviewers:
MarkM
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

* If a property is an accessor property, traverse the getter rather than invoking it and using its return value. This avoids possibly causing side-effects while traversing, and handles accessors on prototypes which throw if not called on an instance. * Introduce a new whitelist value, 'accessor'; properties which are whitelisted as such but not actually accessors are rejected, as are properties which are accessors but whitelisted as data. * Check syntax of whitelist as part of register(). * Shorten getThrowTypeError code by using 'gopd'. @r5508

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -6 lines) Patch
src/com/google/caja/ses/startSES.js View 5 chunks +39 lines, -6 lines 2 comments Download
src/com/google/caja/ses/whitelist.js View 1 chunk +7 lines, -0 lines 2 comments Download

Messages

Total messages: 4
kpreid_google
12 years, 7 months ago (2013-07-24 19:44:45 UTC) #1
kpreid_google
Note on the motivation: This change is necessary to be able to whitelist accessor properties. ...
12 years, 7 months ago (2013-07-24 20:17:23 UTC) #2
MarkM
LGTM https://codereview.appspot.com/11778043/diff/1/src/com/google/caja/ses/startSES.js File src/com/google/caja/ses/startSES.js (right): https://codereview.appspot.com/11778043/diff/1/src/com/google/caja/ses/startSES.js#newcode1600 src/com/google/caja/ses/startSES.js:1600: // Note this is safe not in that ...
12 years, 7 months ago (2013-07-24 22:39:14 UTC) #3
kpreid2
12 years, 7 months ago (2013-07-25 16:33:03 UTC) #4
@r5508

https://codereview.appspot.com/11778043/diff/1/src/com/google/caja/ses/startS...
File src/com/google/caja/ses/startSES.js (right):

https://codereview.appspot.com/11778043/diff/1/src/com/google/caja/ses/startS...
src/com/google/caja/ses/startSES.js:1600: // Note this is safe not in that it is
safe for the prop to be an
On 2013/07/24 22:39:14, MarkM wrote:
> Copy paste error? Inverted comment?

Copy-paste and also I neglected to revise the comment since an earlier version
(we _are_ cleaning).

https://codereview.appspot.com/11778043/diff/1/src/com/google/caja/ses/whitel...
File src/com/google/caja/ses/whitelist.js (right):

https://codereview.appspot.com/11778043/diff/1/src/com/google/caja/ses/whitel...
src/com/google/caja/ses/whitelist.js:51: *     <p>If the property is an accessor
property, it is not
On 2013/07/24 22:39:14, MarkM wrote:
> Do you really want a paragraph break within an <li> section?

Removed.

That is valid, but on second thought not a good idea in this way as it results
in inconsistent formatting; any given list should contain either all bare text
or all paragraphs, not a mix.
Sign in to reply to this message.

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