Open Bug 1731509 Opened 4 years ago Updated 4 years ago

Make GetProperty (for frame properties) return a Maybe<T>

Categories

(Core :: Layout, task)

task

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

Details

Right now GetProperty uses an optional boolean parameter to indicate whether the property was present.

It would probably be more ergonomic to have it return Maybe<T>, at least for "small" values that are stored directly in the slot of the property table.

(Maybe even worth doing for other externally-allocated properties as well, which would then effectively return Maybe<T*> or something along those lines?)

(Thanks to emilio for the suggestion in https://phabricator.services.mozilla.com/D126031#inline-693151 )

You need to log in before you can comment on or make changes to this bug.