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

Issue 2471393004: bindings: Use forward declarations for wrapper types in dictionary_impl (Closed)

Created:
4 years, 1 month ago by bashi
Modified:
4 years, 1 month ago
Reviewers:
haraken, peria, tasak, Yuki
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, serviceworker-reviews, shimazu+serviceworker_chromium.org, ajuma+watch-canvas_chromium.org, dshwang, kinuko+serviceworker, Justin Novosad, Rik, blink-reviews-bindings_chromium.org, nhiroki, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, tzik
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bindings: Use forward declarations for wrapper types in dictionary_impl We used to include wrapper type headers in generated dictionary headers but it could cause circular dependency if there is an idl dictionary which refers an interface and the interface also refers the dictionary. Avoid such circular dependency by using forward declarations. BUG=662403 Committed: https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0 Cr-Commit-Position: refs/heads/master@{#431850}

Patch Set 1 #

Patch Set 2 : WIP #

Total comments: 4

Patch Set 3 : Rebase #

Patch Set 4 : Attempt to fix win failure #

Patch Set 5 : Added copy operator #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -7 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/custom/V8IntersectionObserverCustom.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_dictionary.py View 1 2 3 chunks +13 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_types.py View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl View 1 2 3 4 1 chunk +4 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/idls/core/TestDictionary.idl View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.h View 1 2 3 4 4 chunks +14 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.cpp View 1 2 3 4 4 chunks +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestDictionaryDerivedImplementedAs.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestDictionaryDerivedImplementedAs.cpp View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceEventInit.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceEventInit.cpp View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestPermissiveDictionary.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/TestPermissiveDictionary.cpp View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp View 1 3 chunks +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/InputEvent.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DUsageTrackingTest.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/vr/VRController.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 36 (20 generated)
bashi
PTAL https://codereview.chromium.org/2471393004/diff/20001/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl File third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl (left): https://codereview.chromium.org/2471393004/diff/20001/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl#oldcode21 third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl:21: bool {{member.has_method_name}}() const { return {{member.has_method_expression}}; } I ...
4 years, 1 month ago (2016-11-11 01:54:02 UTC) #10
haraken
LGTM
4 years, 1 month ago (2016-11-11 01:57:36 UTC) #11
bashi
Does the following win build failure means we can't define HeapVector<Member<T>> where T is incomplete ...
4 years, 1 month ago (2016-11-11 02:38:48 UTC) #14
peria
https://codereview.chromium.org/2471393004/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py File third_party/WebKit/Source/bindings/scripts/v8_dictionary.py (right): https://codereview.chromium.org/2471393004/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py#newcode164 third_party/WebKit/Source/bindings/scripts/v8_dictionary.py:164: header_forward_decls = set() I think we rarely use forward ...
4 years, 1 month ago (2016-11-11 03:06:38 UTC) #15
haraken
On 2016/11/11 02:38:48, bashi1 wrote: > Does the following win build failure means we can't ...
4 years, 1 month ago (2016-11-11 03:35:01 UTC) #16
bashi
On 2016/11/11 03:35:01, haraken wrote: > On 2016/11/11 02:38:48, bashi1 wrote: > > Does the ...
4 years, 1 month ago (2016-11-11 03:50:12 UTC) #17
bashi
On 2016/11/11 03:50:12, bashi1 wrote: > On 2016/11/11 03:35:01, haraken wrote: > > On 2016/11/11 ...
4 years, 1 month ago (2016-11-14 02:48:28 UTC) #22
haraken
On 2016/11/14 02:48:28, bashi1 wrote: > On 2016/11/11 03:50:12, bashi1 wrote: > > On 2016/11/11 ...
4 years, 1 month ago (2016-11-14 02:59:13 UTC) #23
bashi
+tasak@ Chatted offline and we thought adding an explicit copy constructor solves the problem, but ...
4 years, 1 month ago (2016-11-14 06:59:59 UTC) #25
bashi
It seems adding operator=() as well solved the problem.
4 years, 1 month ago (2016-11-14 08:33:32 UTC) #26
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/2471393004/80001
4 years, 1 month ago (2016-11-14 08:33:52 UTC) #29
Yuki
lgtm https://codereview.chromium.org/2471393004/diff/80001/third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl File third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl (right): https://codereview.chromium.org/2471393004/diff/80001/third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl#newcode21 third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl:21: {{cpp_class}}::{{cpp_class}}(const {{cpp_class}}&) = default; I don't know well ...
4 years, 1 month ago (2016-11-14 09:26:14 UTC) #30
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-11-14 10:31:36 UTC) #32
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0 Cr-Commit-Position: refs/heads/master@{#431850}
4 years, 1 month ago (2016-11-14 10:36:25 UTC) #34
bashi
https://codereview.chromium.org/2471393004/diff/80001/third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl File third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl (right): https://codereview.chromium.org/2471393004/diff/80001/third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl#newcode21 third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl:21: {{cpp_class}}::{{cpp_class}}(const {{cpp_class}}&) = default; On 2016/11/14 09:26:14, Yuki wrote: ...
4 years, 1 month ago (2016-11-14 22:08:49 UTC) #35
tasak
4 years, 1 month ago (2016-11-16 17:10:59 UTC) #36
Message was sent while issue was closed.
On 2016/11/14 22:08:49, bashi1 wrote:
>
https://codereview.chromium.org/2471393004/diff/80001/third_party/WebKit/Sour...
> File third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl
> (right):
> 
>
https://codereview.chromium.org/2471393004/diff/80001/third_party/WebKit/Sour...
> third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl:21:
> {{cpp_class}}::{{cpp_class}}(const {{cpp_class}}&) = default;
> On 2016/11/14 09:26:14, Yuki wrote:
> > I don't know well about the windows-specific issue, but if you can write "=
> > default" in the header, it's definitely better.
> 
> I had to write them in .cpp to avoid instanciation of HeapVector<Member<T>>.

As far as I know, if we write "= default" in the header, we still need to create
.cpp which just includes the header because of DLL.

Powered by Google App Engine
This is Rietveld 408576698