|
ES5/3 internally used markFuncFreeze in a fashion which suggests that it
is intended that the resulting function is (trivially) transitively
immutable (ignoring prototypes). However, it left the .prototype
property untouched, so any such function, if not otherwise defended, has
an accessible non-frozen .prototype object.
* Replace markFuncFreeze with a function markConstFunc (named to fit
with constFunc) which sets .prototype to null.
* Replace all uses of markFuncFreeze on function literals with
markConstFunc.
* Replaced uses of markFuncFreeze on existing functions with markFunc().
Supporting changes:
* Use ES5/3 interface instead of deprecated Cajita interface to grant
assert functions in ES53RewriterTest.
Fixes <https://code.google.com/p/google-caja/issues/detail?id=1695>.
@r5396
Total comments: 2
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+128 lines, -105 lines) |
Patch |
 |
M |
src/com/google/caja/cajita-promise.js
|
View
|
1
2
|
8 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/es53.js
|
View
|
1
2
|
32 chunks |
+52 lines, -48 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/flash/caja-flash.js
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/plugin/capture-cajoled-module.js
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/plugin/es53-frame-group.js
|
View
|
1
2
|
1 chunk |
+6 lines, -7 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/plugin/load-module.js
|
View
|
1
2
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/plugin/templates/HtmlAttributeRewriter.java
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/parser/quasiliteral/ES53ConformanceTest.java
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/parser/quasiliteral/ES53RewriterTest.java
|
View
|
1
2
|
4 chunks |
+25 lines, -5 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/PipelineCacheTest.java
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/container.js
|
View
|
1
2
|
1 chunk |
+9 lines, -9 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/jsunit.js
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/templates/TemplateCompilerTest.java
|
View
|
1
2
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/templates/template-compiler-golden1-dynamic.js
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/templates/template-compiler-golden1-nulluripol.js
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/templates/template-compiler-golden1-static.js
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 12
|