Closed Bug 1638151 Opened 5 years ago Closed 5 years ago

Failure to generate event getter code for nullable sequences

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: fabrice, Assigned: sg)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Sincehttps://bugzilla.mozilla.org/show_bug.cgi?id=1628692 landed (including the codegen change at https://hg.mozilla.org/integration/autoland/rev/93b096e2d3da) we fail to build the bindings for https://hg.mozilla.org/projects/kaios/file/tip/dom/webidl/CameraFacesDetectedEvent.webidl

 0:11.07 In file included from UnifiedBindings4.cpp:392:                                                                                                                                           
 0:11.07 /media/external/dev/gecko-dev/obj-b2g-qm215/dom/bindings/CameraFacesDetectedEvent.cpp:90:20: error: no member named 'Clone' in 'mozilla::dom::Nullable<nsTArray<RefPtr<mozilla::dom::DOMCa
meraDetectedFace> > >'                                                                                                                                                                             
 0:11.07   aRetVal = mFaces.Clone();                                                                                                                                                               
 0:11.07             ~~~~~~ ^         

That's not so surprising since Nullable doesn't have a Clone() method. I'm not sure what the best way forward is here.

Assignee: nobody → sgiesecke
Status: NEW → ASSIGNED

I added a case distinction for this. Apparently, Gecko itself has no events with any nullable sequence attribute. I would have added a test case, but the existing tests for Codegen.py do not seem to have any tests with events, so adding this is somewhat beyond my current understanding. Fabrice, could you try out the attached patch? Proper test cases might be added in a follow-up.

Flags: needinfo?(fabrice)
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/20304de817e4 Add support for nullable sequence types in Event classes. r=fabrice
Flags: needinfo?(fabrice)
Blocks: 1638768
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: