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

Issue 12801043: Whitelist/tame Typed Arrays and use them in 2D Canvas taming. (Closed)

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

Description

* Whitelist typed-array objects in SES: * ArrayBuffer * Int8Array * Uint8Array * Uint8ClampedArray * Int16Array * Uint16Array * Int32Array * Uint32Array * Float32Array * Float64Array * DataView * Taming membrane copies such objects. Note that this copying breaks sharing of ArrayBuffers among ArrayBufferViews. * ImageData's data property is now an Uint8ClampedArray as is standard rather than a plain array. Byte-by-byte copying is no longer used. * Repair one DataView method throwing DOMException on Firefox and *Array.prototype.set throwing DOMException on Safari. * Repair typed array prototypes appearing unfrozen on Safari. @r5621

Patch Set 1 #

Total comments: 10

Patch Set 2 : Whitelist/tame Typed Arrays and use them in 2D Canvas taming. #

Patch Set 3 : Whitelist/tame Typed Arrays and use them in 2D Canvas taming. #

Total comments: 3

Patch Set 4 : Whitelist/tame Typed Arrays and use them in 2D Canvas taming. #

Total comments: 3

Patch Set 5 : Whitelist/tame Typed Arrays and use them in 2D Canvas taming. #

Patch Set 6 : Whitelist/tame Typed Arrays and use them in 2D Canvas taming. #

Total comments: 6

Patch Set 7 : Whitelist/tame Typed Arrays and use them in 2D Canvas taming. #

Total comments: 2

Patch Set 8 : Whitelist/tame Typed Arrays and use them in 2D Canvas taming. #

Total comments: 6

Patch Set 9 : Whitelist/tame Typed Arrays and use them in 2D Canvas taming. #

Total comments: 3

Patch Set 10 : Whitelist/tame Typed Arrays and use them in 2D Canvas taming. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+503 lines, -91 lines) Patch
M src/com/google/caja/plugin/domado.js View 1 2 3 4 5 6 7 8 9 5 chunks +13 lines, -39 lines 0 comments Download
M src/com/google/caja/plugin/taming-membrane.js View 1 2 3 4 5 6 7 8 9 12 chunks +77 lines, -43 lines 0 comments Download
M src/com/google/caja/ses/repairES5.js View 1 2 3 4 5 6 7 8 9 6 chunks +195 lines, -4 lines 0 comments Download
M src/com/google/caja/ses/startSES.js View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M src/com/google/caja/ses/whitelist.js View 1 2 3 4 5 6 7 8 9 2 chunks +57 lines, -0 lines 0 comments Download
M tests/com/google/caja/plugin/MainBrowserTest.java View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M tests/com/google/caja/plugin/test-scan-guest.js View 1 2 3 4 5 6 7 8 9 3 chunks +104 lines, -4 lines 0 comments Download
M tests/com/google/caja/plugin/test-taming-inout-guest.js View 1 2 3 4 5 6 7 8 9 1 chunk +51 lines, -0 lines 0 comments Download

Messages

Total messages: 35
kpreid2
12 years, 7 months ago (2013-08-12 20:48:09 UTC) #1
MarkM
ses/* stuff LGTM. I am not expert on either typed arrays or DOMExceptions, so my ...
12 years, 7 months ago (2013-08-12 21:05:23 UTC) #2
kpreid2
* Whitelist typed-array objects in ES5/3 and SES: * ArrayBuffer * Int8Array * Uint8Array * ...
12 years, 7 months ago (2013-08-12 21:59:20 UTC) #3
kpreid2
https://codereview.appspot.com/12801043/diff/1/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/12801043/diff/1/src/com/google/caja/ses/repairES5.js#newcode2617 src/com/google/caja/ses/repairES5.js:2617: new DataView(new ArrayBuffer(1)).getInt8(-1); On 2013/08/12 21:05:24, MarkM wrote: > ...
12 years, 7 months ago (2013-08-12 22:00:14 UTC) #4
kpreid2
* Whitelist typed-array objects in SES: * ArrayBuffer * Int8Array * Uint8Array * Uint8ClampedArray * ...
12 years, 5 months ago (2013-10-09 21:35:39 UTC) #5
kpreid2
New snapshot. ES5/3 support is gone, of course, and there's a new hairy repair for ...
12 years, 5 months ago (2013-10-09 21:37:27 UTC) #6
MarkM
https://codereview.appspot.com/12801043/diff/12001/src/com/google/caja/ses/whitelist.js File src/com/google/caja/ses/whitelist.js (right): https://codereview.appspot.com/12801043/diff/12001/src/com/google/caja/ses/whitelist.js#newcode447 src/com/google/caja/ses/whitelist.js:447: length: t, // does not inherit Function on Chrome ...
12 years, 5 months ago (2013-10-09 22:22:05 UTC) #7
kpreid2
* Whitelist typed-array objects in SES: * ArrayBuffer * Int8Array * Uint8Array * Uint8ClampedArray * ...
12 years, 5 months ago (2013-10-09 22:26:53 UTC) #8
kpreid2
https://codereview.appspot.com/12801043/diff/12001/src/com/google/caja/ses/whitelist.js File src/com/google/caja/ses/whitelist.js (right): https://codereview.appspot.com/12801043/diff/12001/src/com/google/caja/ses/whitelist.js#newcode447 src/com/google/caja/ses/whitelist.js:447: length: t, // does not inherit Function on Chrome ...
12 years, 5 months ago (2013-10-09 22:27:10 UTC) #9
MarkM
https://codereview.appspot.com/12801043/diff/12001/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/12801043/diff/12001/src/com/google/caja/ses/repairES5.js#newcode3421 src/com/google/caja/ses/repairES5.js:3421: origMethod.apply(this, arguments); Having a forward reference to a var ...
12 years, 5 months ago (2013-10-09 22:29:22 UTC) #10
MarkM
https://codereview.appspot.com/12801043/diff/19001/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/12801043/diff/19001/src/com/google/caja/ses/repairES5.js#newcode2774 src/com/google/caja/ses/repairES5.js:2774: } else if (e instanceof Error && typeof DOMException ...
12 years, 5 months ago (2013-10-09 22:37:11 UTC) #11
kpreid2
https://codereview.appspot.com/12801043/diff/19001/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/12801043/diff/19001/src/com/google/caja/ses/repairES5.js#newcode2774 src/com/google/caja/ses/repairES5.js:2774: } else if (e instanceof Error && typeof DOMException ...
12 years, 5 months ago (2013-10-09 23:25:46 UTC) #12
MarkM
https://codereview.appspot.com/12801043/diff/19001/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/12801043/diff/19001/src/com/google/caja/ses/repairES5.js#newcode2774 src/com/google/caja/ses/repairES5.js:2774: } else if (e instanceof Error && typeof DOMException ...
12 years, 5 months ago (2013-10-10 00:04:12 UTC) #13
kpreid2
* Whitelist typed-array objects in SES: * ArrayBuffer * Int8Array * Uint8Array * Uint8ClampedArray * ...
12 years, 5 months ago (2013-10-10 00:05:01 UTC) #14
kpreid2
On 2013/10/10 00:04:12, MarkM wrote: > I don't see the change. Forget to snapshot? Oops, ...
12 years, 5 months ago (2013-10-10 00:05:31 UTC) #15
MarkM
On 2013/10/10 00:05:31, kpreid2 wrote: > On 2013/10/10 00:04:12, MarkM wrote: > > I don't ...
12 years, 5 months ago (2013-10-10 00:07:54 UTC) #16
kpreid2
* Whitelist typed-array objects in SES: * ArrayBuffer * Int8Array * Uint8Array * Uint8ClampedArray * ...
12 years, 5 months ago (2013-10-10 00:12:51 UTC) #17
kpreid2
On 2013/10/10 00:07:54, MarkM wrote: > I still don't see it ...OK, now it actually ...
12 years, 5 months ago (2013-10-10 00:14:03 UTC) #18
MarkM
LGTM https://codereview.appspot.com/12801043/diff/32001/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/12801043/diff/32001/src/com/google/caja/ses/repairES5.js#newcode3436 src/com/google/caja/ses/repairES5.js:3436: var repair_TYPED_ARRAY_PROTOS_LOOK_UNFROZEN_wasApplied = false; Since the test occurs ...
12 years, 5 months ago (2013-10-11 00:17:45 UTC) #19
kpreid2
* Whitelist typed-array objects in SES: * ArrayBuffer * Int8Array * Uint8Array * Uint8ClampedArray * ...
12 years, 4 months ago (2013-10-15 22:56:28 UTC) #20
kpreid2
This change still needs review of its not-SES parts, I assume. https://codereview.appspot.com/12801043/diff/32001/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): ...
12 years, 4 months ago (2013-10-15 22:57:33 UTC) #21
MarkM
ses/* parts LGTM On 2013/10/15 22:57:33, kpreid2 wrote: > This change still needs review of ...
12 years, 4 months ago (2013-10-16 13:44:11 UTC) #22
ihab.awad
lgtm++ https://codereview.appspot.com/12801043/diff/33007/src/com/google/caja/plugin/taming-membrane.js File src/com/google/caja/plugin/taming-membrane.js (right): https://codereview.appspot.com/12801043/diff/33007/src/com/google/caja/plugin/taming-membrane.js#newcode220 src/com/google/caja/plugin/taming-membrane.js:220: // that's in line with our general policy ...
12 years, 4 months ago (2013-10-18 19:15:06 UTC) #23
kpreid2
* Whitelist typed-array objects in SES: * ArrayBuffer * Int8Array * Uint8Array * Uint8ClampedArray * ...
12 years, 4 months ago (2013-10-21 17:57:29 UTC) #24
kpreid2
https://codereview.appspot.com/12801043/diff/33007/src/com/google/caja/plugin/taming-membrane.js File src/com/google/caja/plugin/taming-membrane.js (right): https://codereview.appspot.com/12801043/diff/33007/src/com/google/caja/plugin/taming-membrane.js#newcode220 src/com/google/caja/plugin/taming-membrane.js:220: // that's in line with our general policy of ...
12 years, 4 months ago (2013-10-21 17:58:54 UTC) #25
ihab.awad
https://codereview.appspot.com/12801043/diff/70001/tests/com/google/caja/plugin/test-taming-inout-guest.js File tests/com/google/caja/plugin/test-taming-inout-guest.js (right): https://codereview.appspot.com/12801043/diff/70001/tests/com/google/caja/plugin/test-taming-inout-guest.js#newcode189 tests/com/google/caja/plugin/test-taming-inout-guest.js:189: tamedApi.tamedHostPureFunction('assertEquals("2", 3, a.byteLength);', buf); Was the assertion label supposed ...
12 years, 4 months ago (2013-10-22 22:40:48 UTC) #26
kpreid2
https://codereview.appspot.com/12801043/diff/70001/tests/com/google/caja/plugin/test-taming-inout-guest.js File tests/com/google/caja/plugin/test-taming-inout-guest.js (right): https://codereview.appspot.com/12801043/diff/70001/tests/com/google/caja/plugin/test-taming-inout-guest.js#newcode189 tests/com/google/caja/plugin/test-taming-inout-guest.js:189: tamedApi.tamedHostPureFunction('assertEquals("2", 3, a.byteLength);', buf); On 2013/10/22 22:40:48, ihab.awad wrote: ...
12 years, 4 months ago (2013-10-24 20:13:43 UTC) #27
ihab.awad
I recommend we copy every time, consistent with all other arrays. If we find later ...
12 years, 4 months ago (2013-10-25 21:21:41 UTC) #28
kpreid2
* Whitelist typed-array objects in SES: * ArrayBuffer * Int8Array * Uint8Array * Uint8ClampedArray * ...
12 years, 4 months ago (2013-10-25 22:28:08 UTC) #29
kpreid2
On 2013/10/25 21:21:41, ihab.awad wrote: > I recommend we copy every time, consistent with all ...
12 years, 4 months ago (2013-10-25 22:34:32 UTC) #30
ihab.awad
lgtm++ but please consider the comments. https://codereview.appspot.com/12801043/diff/170001/src/com/google/caja/plugin/taming-membrane.js File src/com/google/caja/plugin/taming-membrane.js (right): https://codereview.appspot.com/12801043/diff/170001/src/com/google/caja/plugin/taming-membrane.js#newcode172 src/com/google/caja/plugin/taming-membrane.js:172: * copyUnmemoized performs ...
12 years, 4 months ago (2013-10-25 22:53:11 UTC) #31
ihab.awad
lgtm++ but please consider the comments. https://codereview.appspot.com/12801043/diff/170001/src/com/google/caja/plugin/taming-membrane.js File src/com/google/caja/plugin/taming-membrane.js (right): https://codereview.appspot.com/12801043/diff/170001/src/com/google/caja/plugin/taming-membrane.js#newcode172 src/com/google/caja/plugin/taming-membrane.js:172: * copyUnmemoized performs ...
12 years, 4 months ago (2013-10-25 22:53:12 UTC) #32
kpreid2
https://codereview.appspot.com/12801043/diff/170001/src/com/google/caja/plugin/taming-membrane.js File src/com/google/caja/plugin/taming-membrane.js (right): https://codereview.appspot.com/12801043/diff/170001/src/com/google/caja/plugin/taming-membrane.js#newcode247 src/com/google/caja/plugin/taming-membrane.js:247: function copyUnmemoized(o, recursor) { On 2013/10/25 22:53:12, ihab.awad wrote: ...
12 years, 4 months ago (2013-10-28 16:42:38 UTC) #33
ihab.awad
I think "pick one and submit with confidence" would be my feedback at this point. ...
12 years, 4 months ago (2013-10-28 21:53:02 UTC) #34
kpreid2
12 years, 4 months ago (2013-10-28 23:20:36 UTC) #35
* Whitelist typed-array objects in SES:
  * ArrayBuffer
  * Int8Array
  * Uint8Array
  * Uint8ClampedArray
  * Int16Array
  * Uint16Array
  * Int32Array
  * Uint32Array
  * Float32Array
  * Float64Array
  * DataView
* Taming membrane copies such objects. Note that this copying
  breaks sharing of ArrayBuffers among ArrayBufferViews.
* ImageData's data property is now an Uint8ClampedArray as is standard
  rather than a plain array. Byte-by-byte copying is no longer used.
* Repair one DataView method throwing DOMException on Firefox and
  *Array.prototype.set throwing DOMException on Safari.
* Repair typed array prototypes appearing unfrozen on Safari.
Sign in to reply to this message.

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