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

Issue 2183623004: Add IDLDictionaryBase (Closed)

Created:
4 years, 4 months ago by bashi
Modified:
4 years, 4 months ago
Reviewers:
haraken, Yuki
CC:
chromium-reviews, blink-reviews, blink-reviews-bindings_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add IDLDictionaryBase Before this CL, given an IDL dictionary (e.g. FooDictionary) the code generator generated ToV8() directly. This is problematic when Blink wants to pass a sub-dictionary of FooDictionary because generated ToV8() doesn't convert members defined in the sub-dictionary. To solve this problem, add a base class which provides toV8Impl() virtual function. The code generator overrides toV8Impl() and ToV8() uses them. ToV8() automatically calls appropriate toV8Impl(). BUG=630210 Committed: https://crrev.com/190cffeadfe46c6419789d586551c877b24f082f Cr-Commit-Position: refs/heads/master@{#408093}

Patch Set 1 #

Patch Set 2 : Update class description #

Total comments: 8

Patch Set 3 : Fix multi-level inheritance bug #

Total comments: 5

Patch Set 4 : comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -32 lines) Patch
M third_party/WebKit/LayoutTests/fast/dom/idl-dictionary-unittest.html View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/idl-dictionary-unittest-expected.txt View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h View 1 2 3 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.cpp View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ToV8.h View 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/v8.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_dictionary.py View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/dictionary_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/dictionary_v8.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp View 1 2 1 chunk +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.h View 3 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestDictionaryDerivedImplementedAs.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceEventInit.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestPermissiveDictionary.h View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestPermissiveDictionary.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionaryDerived.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp View 1 2 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInit.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp View 1 2 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core_generated.gypi View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/DictionaryTest.h View 1 2 3 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/DictionaryTest.cpp View 1 2 2 chunks +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/DictionaryTest.idl View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
A + third_party/WebKit/Source/core/testing/InternalDictionaryDerivedDerived.idl View 1 2 1 chunk +2 lines, -5 lines 0 comments Download

Messages

Total messages: 29 (16 generated)
bashi
PTAL
4 years, 4 months ago (2016-07-26 10:43:15 UTC) #7
haraken
Just help me understand: If we have: dictionary A { ... }; dictionary B : ...
4 years, 4 months ago (2016-07-26 10:50:13 UTC) #8
Yuki
On 2016/07/26 10:50:13, haraken wrote: > Just help me understand: > > If we have: ...
4 years, 4 months ago (2016-07-26 10:59:05 UTC) #9
Yuki
LGTM with nits. https://codereview.chromium.org/2183623004/diff/20001/third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.cpp File third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.cpp (right): https://codereview.chromium.org/2183623004/diff/20001/third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.cpp#newcode9 third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.cpp:9: IDLDictionaryBase::IDLDictionaryBase() nit: You can make this ...
4 years, 4 months ago (2016-07-26 10:59:55 UTC) #10
haraken
On 2016/07/26 10:59:05, Yuki wrote: > On 2016/07/26 10:50:13, haraken wrote: > > Just help ...
4 years, 4 months ago (2016-07-26 11:04:30 UTC) #11
Yuki
On 2016/07/26 11:04:30, haraken wrote: > On 2016/07/26 10:59:05, Yuki wrote: > > On 2016/07/26 ...
4 years, 4 months ago (2016-07-26 12:22:55 UTC) #12
bashi
> haraken@ was right. This CL and the current implementation seem not supporting > multi-level ...
4 years, 4 months ago (2016-07-27 02:36:33 UTC) #17
haraken
LGTM
4 years, 4 months ago (2016-07-27 04:24:42 UTC) #20
Yuki
LGTM. https://codereview.chromium.org/2183623004/diff/40001/third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h File third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h (right): https://codereview.chromium.org/2183623004/diff/40001/third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h#newcode21 third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h:21: IDLDictionaryBase() {} I don't know why, but Blink's ...
4 years, 4 months ago (2016-07-27 05:38:33 UTC) #21
bashi
https://codereview.chromium.org/2183623004/diff/40001/third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h File third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h (right): https://codereview.chromium.org/2183623004/diff/40001/third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h#newcode21 third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h:21: IDLDictionaryBase() {} On 2016/07/27 05:38:33, Yuki wrote: > I ...
4 years, 4 months ago (2016-07-27 09:01:20 UTC) #22
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/2183623004/60001
4 years, 4 months ago (2016-07-27 09:01:48 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-07-27 11:04:57 UTC) #27
commit-bot: I haz the power
4 years, 4 months ago (2016-07-27 11:06:43 UTC) #29
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/190cffeadfe46c6419789d586551c877b24f082f
Cr-Commit-Position: refs/heads/master@{#408093}

Powered by Google App Engine
This is Rietveld 408576698