[ews] cleanup: Encapsulate update folder callbacks in a safe Rust interface.
Categories
(Thunderbird :: Account Manager, enhancement)
Tracking
(Not tracked)
People
(Reporter: edicharry, Assigned: edicharry)
References
Details
Attachments
(1 file)
We have a number of unsafe calls in ews_xpcom::client, mostly to the callback functions we are accepting via the XPCOM interface. Each of these unsafe calls involves taking Rust-native types, converting them to XPCOM types, and then calling an unsafe XPCOM method with the converted types. I believe that the idiomatic safe Rust approach to an interface like this would be to create an opaque wrapper for the callback types that handles the conversion to-from unsafe XPCOM functions/types.
This issue covers handling this specifically for IEwsFolderCallbacks.
This was the result of a small refactor I did as part of https://bugzilla.mozilla.org/show_bug.cgi?id=1956568 , and Heather suggested I submit it as its own bug/patch in case we don't want this right now.
| Assignee | ||
Comment 1•7 months ago
|
||
Updated•7 months ago
|
| Assignee | ||
Updated•7 months ago
|
Pushed by arschmitz@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/760e7c0f8aff
Add memory-safe interface to IEwsFolderCallbacks. r=heather,babolivier
Updated•6 months ago
|
Description
•