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

Issue 135052: Some cleanup (Closed)

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

Description

Made ordering of script loading in domita_test consistent with that in domita-minified.js, and made sure domita-minified includes the html sanitizer, which is now required by the html-emitter because of document.write support. Fixed minor problem with SafeIdentifierMaker -- the name "eval" has special significance, so make sure it doesn't output it. This is unlikely to have happened in practice, since the code is unused, and would only surface if run over a file with more than 5 * pow(26, 3) identifiers. Added a consistency check to FunctionDeclaration. Cleaned up uses of feature detection in bridal.js. Added an iterators utility class to make it easy to implement SafeIdentifierMaker as a filter operation over a stream of candidate names. Submitted @3807

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -47 lines) Patch
M build.xml View 2 chunks +4 lines, -0 lines 0 comments Download
M src/com/google/caja/parser/js/FunctionDeclaration.java View 1 chunk +5 lines, -3 lines 0 comments Download
M src/com/google/caja/plugin/bridal.js View 6 chunks +27 lines, -28 lines 0 comments Download
M src/com/google/caja/service/ContentTypeCheck.java View 1 chunk +1 line, -1 line 0 comments Download
A src/com/google/caja/util/Iterators.java View 1 chunk +54 lines, -0 lines 0 comments Download
M src/com/google/caja/util/SafeIdentifierMaker.java View 1 chunk +9 lines, -1 line 2 comments Download
M tests/com/google/caja/plugin/domita_test.html View 4 chunks +14 lines, -14 lines 0 comments Download
M tests/com/google/caja/util/SafeIdentifierMakerTest.java View 1 chunk +51 lines, -0 lines 0 comments Download

Messages

Total messages: 4
MikeSamuel
16 years, 7 months ago (2009-10-19 22:04:53 UTC) #1
metaweta
LGTM I like the SafeIdentifierMaker test.
16 years, 7 months ago (2009-10-19 23:07:22 UTC) #2
DavidSarah
http://codereview.appspot.com/135052/diff/1/7 File src/com/google/caja/util/SafeIdentifierMaker.java (right): http://codereview.appspot.com/135052/diff/1/7#newcode74 Line 74: // thrown. Also, "eval" and "arguments" (see http://bugs.ecmascript.org/ticket/467 ...
16 years, 7 months ago (2009-10-20 01:40:36 UTC) #3
DavidSarah
16 years, 7 months ago (2009-10-20 01:42:49 UTC) #4
http://codereview.appspot.com/135052/diff/1/7
File src/com/google/caja/util/SafeIdentifierMaker.java (right):

http://codereview.appspot.com/135052/diff/1/7#newcode74
Line 74: // thrown.
On 2009/10/20 01:40:37, DavidSarah wrote:
> Also, "eval" and "arguments" (see http://bugs.ecmascript.org/ticket/467 ) are
> not allowed as identifiers in ES5 strict mode.

I meant, not allowed as LeftHandSideExpressions (and the simplest way to avoid
that is to avoid them as identifiers).
Sign in to reply to this message.

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