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

Issue 1029093003: [WIP] IDL: Add limited serializer support and use for RTCIceCandidate (Closed)

Created:
5 years, 9 months ago by Jens Widell
Modified:
5 years, 1 month ago
Reviewers:
haraken, perkj_chrome, bashi
CC:
blink-reviews, blink-reviews-bindings_chromium.org, tommyw+watchlist_chromium.org, vivekg_samsung, arv+blink, vivekg
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[WIP] IDL: Add limited serializer support and use for RTCIceCandidate BUG=469650, 467366

Patch Set 1 : #

Patch Set 2 : use V8ObjectBuilder in modules/crypto #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -69 lines) Patch
M Source/bindings/core/v8/Dictionary.h View 1 1 chunk +0 lines, -11 lines 0 comments Download
M Source/bindings/core/v8/Dictionary.cpp View 1 2 chunks +0 lines, -31 lines 0 comments Download
A Source/bindings/core/v8/V8ObjectBuilder.h View 1 1 chunk +39 lines, -0 lines 2 comments Download
A Source/bindings/core/v8/V8ObjectBuilder.cpp View 1 1 chunk +60 lines, -0 lines 2 comments Download
M Source/bindings/core/v8/v8.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/scripts/idl_definitions.py View 7 chunks +54 lines, -0 lines 0 comments Download
M Source/bindings/scripts/v8_interface.py View 1 chunk +21 lines, -3 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 5 chunks +13 lines, -5 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface2.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/crypto/CryptoKey.cpp View 1 3 chunks +10 lines, -10 lines 0 comments Download
M Source/modules/crypto/CryptoResultImpl.cpp View 1 1 chunk +3 lines, -6 lines 0 comments Download
M Source/modules/mediastream/RTCIceCandidate.h View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/modules/mediastream/RTCIceCandidate.cpp View 2 chunks +8 lines, -0 lines 0 comments Download
M Source/modules/mediastream/RTCIceCandidate.idl View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Jens Widell
This is a draft, and the RTCIceCandidate modification is a (working) example of how it ...
5 years, 9 months ago (2015-03-23 14:37:19 UTC) #3
haraken
I'm OK with V8ObjectBuilder, but it would be great if we could share more code ...
5 years, 9 months ago (2015-03-23 14:44:28 UTC) #4
Jens Widell
On 2015/03/23 14:44:28, haraken wrote: > I'm OK with V8ObjectBuilder, but it would be great ...
5 years, 9 months ago (2015-03-23 14:55:08 UTC) #5
Jens Widell
On 2015/03/23 14:55:08, Jens Widell wrote: > On 2015/03/23 14:44:28, haraken wrote: > > I'm ...
5 years, 9 months ago (2015-03-23 15:49:08 UTC) #6
bashi
I'm supportive on adding V8ObjectBuilder and make Dictionary read-only. https://codereview.chromium.org/1029093003/diff/40001/Source/bindings/core/v8/V8ObjectBuilder.cpp File Source/bindings/core/v8/V8ObjectBuilder.cpp (right): https://codereview.chromium.org/1029093003/diff/40001/Source/bindings/core/v8/V8ObjectBuilder.cpp#newcode48 Source/bindings/core/v8/V8ObjectBuilder.cpp:48: ...
5 years, 9 months ago (2015-03-24 00:49:05 UTC) #7
Jens Widell
5 years, 9 months ago (2015-03-24 07:10:03 UTC) #8
https://codereview.chromium.org/1029093003/diff/40001/Source/bindings/core/v8...
File Source/bindings/core/v8/V8ObjectBuilder.cpp (right):

https://codereview.chromium.org/1029093003/diff/40001/Source/bindings/core/v8...
Source/bindings/core/v8/V8ObjectBuilder.cpp:48: V8ObjectBuilder
V8ObjectBuilder::addObject(String name)
On 2015/03/24 00:49:04, bashi1 wrote:
> This looks different from other add methds() so addObject sounds a bit strange
> to me.

Yes, it's a bit unusual. Would probably be better to make the v8::Value add()
version public and do

  builder1.add("name", builder2.v8Value());

when building and adding a sub-object. Or add a 

  void add(String, const V8ObjectBuilder&);

overload, for that matter.

https://codereview.chromium.org/1029093003/diff/40001/Source/bindings/core/v8...
File Source/bindings/core/v8/V8ObjectBuilder.h (right):

https://codereview.chromium.org/1029093003/diff/40001/Source/bindings/core/v8...
Source/bindings/core/v8/V8ObjectBuilder.h:22: void add(String name, const
ScriptValue&);
On 2015/03/24 00:49:05, bashi1 wrote:
> nit: How about making add methods return *this? This way, call site can use
> following pattern.
> 
>   builder.addNull("x")
>     .addBoolean("y", true)
>     .addNumber("z", 42);
> 
> I'm sure you know this pattern, and I'm not sure we want to do in Blink, so
this
> is just a nit.

Yeah, might as well do this, if we drop the current addObject(). (Combining this
with the current addObject() would be quite confusing.)

Powered by Google App Engine
This is Rietveld 408576698