New issue
Advanced search Search tips

Issue 662403 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 656781



Sign in to add a comment

Circular dependency in WebIDL files are not possible.

Project Member Reported by nzolghadr@chromium.org, Nov 4 2016

Issue description

There are a lot of cases that an interface in WebIDL uses another interface. However, in Chrome code generation we add a include line to the generated code like FocusEventInit.h (https://cs.chromium.org/chromium/src/out/Debug/gen/blink/core/events/FocusEventInit.h?sq=package:chromium&dr=CSs) which includes EventTarget.h as oppose to only forward declare the class in the header file.
Forward declaring the class when it's possible instead of including allowa us to have some circular dependency in WebIDL that is not currently possible.
 

Comment 1 by kochi@chromium.org, Nov 7 2016

Components: -Blink Blink>Bindings
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/827df14d32e901f5b7fee5a4e8fb05a56754ef44

commit 827df14d32e901f5b7fee5a4e8fb05a56754ef44
Author: bashi <bashi@chromium.org>
Date: Sat Nov 12 01:15:23 2016

bindings: Stop using Nullable<T> in dictionary impl

Nullable<T> requires complete definition of T.
This could be a problem when we want to use forward declaration
to avoid cycler dependency. Stop using Nullable<T> and use flags
instead to implement hasXXX() methods.

BUG= 662403 

Review-Url: https://codereview.chromium.org/2494973002
Cr-Commit-Position: refs/heads/master@{#431720}

[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py
[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/scripts/v8_types.py
[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl
[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl
[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.cpp
[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.h
[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/tests/results/core/TestDictionaryDerivedImplementedAs.cpp
[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/tests/results/core/TestDictionaryDerivedImplementedAs.h
[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceEventInit.cpp
[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceEventInit.h
[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/tests/results/core/TestPermissiveDictionary.cpp
[modify] https://crrev.com/827df14d32e901f5b7fee5a4e8fb05a56754ef44/third_party/WebKit/Source/bindings/tests/results/core/TestPermissiveDictionary.h

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0

commit b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0
Author: bashi <bashi@chromium.org>
Date: Mon Nov 14 10:31:07 2016

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 

Review-Url: https://codereview.chromium.org/2471393004
Cr-Commit-Position: refs/heads/master@{#431850}

[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/core/v8/custom/V8IntersectionObserverCustom.cpp
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/scripts/v8_types.py
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/tests/idls/core/TestDictionary.idl
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.cpp
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.h
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/tests/results/core/TestDictionaryDerivedImplementedAs.cpp
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/tests/results/core/TestDictionaryDerivedImplementedAs.h
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceEventInit.cpp
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceEventInit.h
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/tests/results/core/TestPermissiveDictionary.cpp
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/tests/results/core/TestPermissiveDictionary.h
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/core/events/InputEvent.h
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DUsageTrackingTest.cpp
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp
[modify] https://crrev.com/b90d742c7e342d29dcc8b64b3a9ed5fdb398f1d0/third_party/WebKit/Source/modules/vr/VRController.cpp

Comment 4 by bashi@chromium.org, Nov 14 2016

Status: Fixed (was: Assigned)

Sign in to add a comment