Open Bug 1696219 Opened 4 years ago Updated 1 year ago

Serializable attribute on WebIDL fails in C++ errors

Categories

(Core :: DOM: Bindings (WebIDL), defect, P5)

defect

Tracking

()

People

(Reporter: kvark, Unassigned)

References

Details

[Pref="dom.webgpu.enabled",
 Exposed=Window,
 Serializable]
interface GPURenderPipeline {
};

Ends up with a C++ compile error:

 3:01.86 WebIDLSerializable.cpp:59:16: error: use of undeclared identifier 'SCTAG_DOM_GPURENDERPIPELINE'
 3:01.86     /* mTag */ SCTAG_DOM_GPURENDERPIPELINE,
 3:01.86                ^
 3:01.86 WebIDLSerializable.cpp:81:22: error: cannot use incomplete type 'const mozilla::dom::WebIDLSerializableEntry []' as a range
 3:01.86   for (auto& entry : sEntries) {

We either need to implement this properly, or issue a proper error coming from WebIDL pointing about invalid construct, if this isn't meant to be supported. A C++ error here is confusing.

WebIDL codegen won't generate the definition of StructuredCloneTags, you need to define it on your own in https://searchfox.org/mozilla-central/source/dom/base/StructuredCloneTags.h.

Flags: needinfo?(dmalyshau)

Thank you for the pointers! Can we have a more civilized error message in this case?

Flags: needinfo?(dmalyshau)
Severity: -- → S4
Priority: -- → P5
Blocks: VideoFrame

Serializable annotations were removed from webgpu for v1.

No longer blocks: webgpu-v1
No longer blocks: VideoFrame
No longer blocks: 1844861
See Also: → 1844861
You need to log in before you can comment on or make changes to this bug.