Closed Bug 1296594 Opened 8 years ago Closed 8 years ago

stylo: Move Servo binding functions to a list file to reduce code duplication

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

References

Details

Attachments

(1 file)

Currently, when adding a binding function which is implemented in the Servo side, we would need to add a declaration to ServoBindings.h and add a stub definition to ServoBindings.cpp with a MOZ_CRASH. Changing any of those functions would need changing both places as well, which is error-prone (especially given that the stub definitions in ServoBindings.cpp are only compiled with non-stylo built, so one may forget to change that until pushing to the CI system).

We can move all those binding functions into a unified list file, and use macro to generate the declarations and definitions.
The Servo side change of this bug doesn't need to coordinate with this patch, as Servo doesn't really need the declarations it implements.
Comment on attachment 8782856 [details]
Bug 1296594 - Move Servo binding functions to a list file.

https://reviewboard.mozilla.org/r/72886/#review70742

Nice.
Attachment #8782856 - Flags: review?(bobbyholley) → review+
Pushed by bholley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/422bce8e5a41
Move Servo binding functions to a list file. r=bholley
https://hg.mozilla.org/mozilla-central/rev/422bce8e5a41
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Assignee: nobody → xidorn+moz
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: