[rust] Use the specified type for xpidl constants
Categories
(Core :: XPCOM, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox97 | --- | fixed |
People
(Reporter: nika, Assigned: nika)
Details
Attachments
(3 files)
This will reduce the need for unnecessary casts from i64 to the actual desired type in rust code which are implicit in c++ and JS.
| Assignee | ||
Comment 1•4 years ago
|
||
The constants must fit within an int32_t or uint32_t as that is required by the
JS backend with xpt types holding a uint32_t and signed bit.
| Assignee | ||
Comment 2•4 years ago
|
||
Previously all xpidl constants were specified as i64 which means they require
casts before being passed to any xpcom methods. The lack of typing was not an
issue in c++ due to implicit casts from enums to integer types, but using the
correct type is much more valuable in Rust.
Depends on D135164
| Assignee | ||
Comment 3•4 years ago
|
||
Depends on D135165
Comment 5•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/61f998fe727e
https://hg.mozilla.org/mozilla-central/rev/9d8cfa10fa95
https://hg.mozilla.org/mozilla-central/rev/32873022d2ed
Description
•