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

Issue 2323413002: Support ImageData cloning in the V8-based structured clone path. (Closed)

Created:
4 years, 3 months ago by jbroman
Modified:
4 years, 3 months ago
Reviewers:
haraken, esprehn
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews, jbroman+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support ImageData cloning in the V8-based structured clone path. This paves the way for other DOM wrappers to be serialized. BUG=148757 Committed: https://crrev.com/e29d78e9bf1079f66fd4c2fc9c0df8701c9d196b Cr-Commit-Position: refs/heads/master@{#419172}

Patch Set 1 #

Patch Set 2 : unit tests #

Patch Set 3 : add the isolate parameter #

Patch Set 4 : does win_clang like the other order better? #

Total comments: 8

Messages

Total messages: 26 (15 generated)
jbroman
4 years, 3 months ago (2016-09-16 14:02:54 UTC) #12
haraken
LGTM It's really confusing that ScriptValueSerializer and V8ScriptValueSerializer at the same time. Shall we rename ...
4 years, 3 months ago (2016-09-16 14:17:53 UTC) #13
jbroman
On 2016/09/16 at 14:17:53, haraken wrote: > It's really confusing that ScriptValueSerializer and V8ScriptValueSerializer at ...
4 years, 3 months ago (2016-09-16 14:34:33 UTC) #14
haraken
On 2016/09/16 14:34:33, jbroman wrote: > On 2016/09/16 at 14:17:53, haraken wrote: > > It's ...
4 years, 3 months ago (2016-09-16 14:39:45 UTC) #15
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/2323413002/60001
4 years, 3 months ago (2016-09-16 14:42:45 UTC) #18
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-16 15:32:42 UTC) #19
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/e29d78e9bf1079f66fd4c2fc9c0df8701c9d196b Cr-Commit-Position: refs/heads/master@{#419172}
4 years, 3 months ago (2016-09-16 15:35:08 UTC) #21
esprehn
https://codereview.chromium.org/2323413002/diff/60001/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp File third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp (right): https://codereview.chromium.org/2323413002/diff/60001/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp#newcode91 third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp:91: if (wrapperTypeInfo == &V8ImageData::wrapperTypeInfo) { fwiw I wonder if ...
4 years, 3 months ago (2016-09-16 18:41:28 UTC) #23
jbroman
https://codereview.chromium.org/2323413002/diff/60001/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp File third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp (right): https://codereview.chromium.org/2323413002/diff/60001/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp#newcode91 third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp:91: if (wrapperTypeInfo == &V8ImageData::wrapperTypeInfo) { On 2016/09/16 at 18:41:27, ...
4 years, 3 months ago (2016-09-16 19:40:02 UTC) #24
haraken
On 2016/09/16 19:40:02, jbroman wrote: > https://codereview.chromium.org/2323413002/diff/60001/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp > File > third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp > (right): > > ...
4 years, 3 months ago (2016-09-17 00:06:33 UTC) #25
haraken
4 years, 3 months ago (2016-09-17 00:07:10 UTC) #26
Message was sent while issue was closed.
On 2016/09/17 00:06:33, haraken wrote:
> On 2016/09/16 19:40:02, jbroman wrote:
> >
>
https://codereview.chromium.org/2323413002/diff/60001/third_party/WebKit/Sour...
> > File
> >
>
third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp
> > (right):
> > 
> >
>
https://codereview.chromium.org/2323413002/diff/60001/third_party/WebKit/Sour...
> >
>
third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp:91:
> > if (wrapperTypeInfo == &V8ImageData::wrapperTypeInfo) {
> > On 2016/09/16 at 18:41:27, esprehn wrote:
> > > fwiw I wonder if we should use a HashMap of <WrapperTypeInfo*,
> WTF::Function>
> > instead and modules should just register() all the types with the map
instead
> of
> > this virtual override dance. It would mean that modules no longer needs to
> > subclass this thing, and individual modules can just register their
> serializers
> > and the function would take a serializer instance.
> > 
> > I suggested doing that to ScriptValueSerializer a while back, and got push
> back.
> > And to be honest, I now do think it's simpler this way, especially because
> you'd
> > need a similar map (from SerializationTag) on the other side, so you'd have
> each
> > one implementing two WTF::Functions. The natural response to that is to make
> it
> > a class that gets registered with a WrapperTypeInfo* and a SerializationTag.
> > It's not even a perfectly clean abstraction, because some, like Blob and
> > MessagePort, are special snowflakes that need to do particular things
> > (WebBlobInfoArray needs to be exported so that the storage layer can manage
> the
> > blob/indexeddb connection; message port entanglement is currently done
> > specially).
> 
> (I don't have any strong opinion on this. The clearer, the better :-)

s/clearer/cleaner/

Powered by Google App Engine
This is Rietveld 408576698