Spun off https://bugs.chromium.org/p/chromium/issues/detail?id=700225#c8.
If one has an IDL construct like this:
void func((boolean or sequence<Element>) arg);
in an interface, the IDL compiler will generate two union files, BooleanOrElementSequence.cpp and BooleanOrElementSequence.h.
BooleanOrElementSequence.h contains declarations such as:
const HeapVector<Member<Element>>& getAsElementSequence() const;
HeapVector<Member<Element>> m_elementSequence;
However, BooleanOrElementSequence.h does not forward-declare Element, neither does it include Element.h (or V8Element.h), which leads to build failures. V8Element.h is only included by BooleanOrElementSequence.cpp.
This applies to unions which have a sequence<T> and/or a record<K, T>, and T is another union, an IDL interface and any types that will generate custom header files.
Comment 1 by raphael....@intel.com
, Mar 15 2017