Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Issue 2719883004: Adds support for ArrayBufferContents with external buffer. (Closed)

Created:
3 years, 9 months ago by alokp
Modified:
3 years, 9 months ago
Reviewers:
haraken, jbroman
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-platform-graphics_chromium.org, blink-reviews-wtf_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, fmalita+watch_chromium.org, Justin Novosad, kinuko+watch, Mikhail, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adds support for ArrayBufferContents with external buffer. The current implementation of WTF::ArrayBuffer assumes that underlying buffer is always owned by the ArrayBuffer. This patch teaches ArrayBufferContents about external buffers that are not owned by the ArrayBuffer. This support is need to implement JS bindings for mojo shared buffer where a buffer owned by mojo needs to be exposed as an ArrayBuffer. More details here: https://codereview.chromium.org/2720873002/ BUG=647036 Review-Url: https://codereview.chromium.org/2719883004 Cr-Commit-Position: refs/heads/master@{#453861} Committed: https://chromium.googlesource.com/chromium/src/+/cce921f5c9a04fa1d7aa70075c70678e3504ef49

Patch Set 1 #

Total comments: 2

Patch Set 2 : passes unique_ptr #

Total comments: 8

Patch Set 3 : adds createData #

Total comments: 3

Patch Set 4 : renames ScopedData -> DataHandle #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -64 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp View 1 1 chunk +5 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp View 1 2 3 2 chunks +6 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h View 1 2 3 6 chunks +18 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp View 1 2 3 5 chunks +24 lines, -27 lines 0 comments Download

Messages

Total messages: 35 (15 generated)
alokp
3 years, 9 months ago (2017-02-27 23:58:24 UTC) #2
jbroman
Huh, not as bad as I'd feared it would be. You'll want an OK from ...
3 years, 9 months ago (2017-02-28 01:28:50 UTC) #6
haraken
Hmm. Would you help me understand why normal JS bindings don't need to externalize array ...
3 years, 9 months ago (2017-02-28 03:27:34 UTC) #9
alokp
Mojo supports read-only shared buffer, but the current js bindings use v8::ArrayBuffer, which as you ...
3 years, 9 months ago (2017-02-28 06:28:23 UTC) #10
alokp
On 2017/02/28 03:27:34, haraken wrote: > Hmm. > > Would you help me understand why ...
3 years, 9 months ago (2017-02-28 06:32:43 UTC) #11
haraken
On 2017/02/28 06:32:43, alokp wrote: > On 2017/02/28 03:27:34, haraken wrote: > > Hmm. > ...
3 years, 9 months ago (2017-02-28 08:30:30 UTC) #12
jbroman
On 2017/02/28 at 08:30:30, haraken wrote: > On 2017/02/28 06:32:43, alokp wrote: > > On ...
3 years, 9 months ago (2017-02-28 19:05:47 UTC) #13
alokp
On 2017/02/28 19:05:47, jbroman wrote: > On 2017/02/28 at 08:30:30, haraken wrote: > > On ...
3 years, 9 months ago (2017-02-28 19:37:32 UTC) #14
jbroman
Thanks. And I like using std::unique_ptr to make sure that lifetime is managed correctly on ...
3 years, 9 months ago (2017-02-28 20:01:19 UTC) #15
alokp
I think this patch improves the ArrayBufferContents API independent of mojo consideration. We can discuss ...
3 years, 9 months ago (2017-02-28 20:56:09 UTC) #16
jbroman
Well, except that the DataDeleter only has one implementation if we don't need a separate ...
3 years, 9 months ago (2017-02-28 22:31:47 UTC) #19
jbroman
On 2017/02/28 at 22:31:47, jbroman wrote: > Well, except that the DataDeleter only has one ...
3 years, 9 months ago (2017-02-28 22:32:34 UTC) #20
alokp
+haraken
3 years, 9 months ago (2017-03-01 00:50:27 UTC) #24
haraken
On 2017/03/01 00:50:27, alokp wrote: > +haraken Thanks for all the discussion. Yeah, this looks ...
3 years, 9 months ago (2017-03-01 01:46:42 UTC) #25
haraken
LGTM https://codereview.chromium.org/2719883004/diff/40001/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h File third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h (right): https://codereview.chromium.org/2719883004/diff/40001/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h#newcode54 third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h:54: using ScopedData = std::unique_ptr<void, DataDeleter>; Nit: I'd rename ...
3 years, 9 months ago (2017-03-01 01:55:36 UTC) #26
alokp
https://codereview.chromium.org/2719883004/diff/40001/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h File third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h (right): https://codereview.chromium.org/2719883004/diff/40001/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h#newcode54 third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h:54: using ScopedData = std::unique_ptr<void, DataDeleter>; On 2017/03/01 01:55:36, haraken ...
3 years, 9 months ago (2017-03-01 02:01:51 UTC) #27
haraken
On 2017/03/01 02:01:51, alokp wrote: > https://codereview.chromium.org/2719883004/diff/40001/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h > File third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h (right): > > https://codereview.chromium.org/2719883004/diff/40001/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h#newcode54 > ...
3 years, 9 months ago (2017-03-01 02:02:44 UTC) #28
jbroman
lgtm 2 (and I'm fine with whatever name you settle on for the unique_ptr)
3 years, 9 months ago (2017-03-01 02:59:30 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2719883004/60001
3 years, 9 months ago (2017-03-01 04:24:38 UTC) #32
commit-bot: I haz the power
3 years, 9 months ago (2017-03-01 06:11:41 UTC) #35
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/cce921f5c9a04fa1d7aa70075c70...

Powered by Google App Engine
This is Rietveld 408576698