Open
Bug 1208516
Opened 9 years ago
Updated 2 years ago
use mozilla::Variant to define IPDL unions
Categories
(Core :: IPC, defect)
Core
IPC
Tracking
()
NEW
People
(Reporter: froydnj, Unassigned)
References
Details
There's a fair bit of code generated in service of generating tagged unions in the ipdl code generator. If we converted all that to using mozilla::Variant, there would be a lot of code that went away, and we might be able to get rid of the duplication of IPDL serialization methods for common structures across protocols as well. (Maybe even getting rid of the awful hack we use for making things work correctly with Read/Write.)
I'm not sure how deeply baked in the idea of being able to check the union's type with the tag is, though. It might not be very feasible.
(In reply to Nathan Froyd [:froydnj] from comment #0)
> I'm not sure how deeply baked in the idea of being able to check the union's
> type with the tag is, though. It might not be very feasible.
That's used in a ton of places :-/
Comment 2•9 years ago
|
||
Type checking is a pretty fundamental feature of the IPDL union types. I must admit after reading the mozilla/Variant.h header I'm still pretty clueless about what it's good for and not good for. But since unions can contain both plain data and actors, I don't know how we can avoid IPDL having deep knowledge of the contents of unions so that it can do the proper state checking on actors.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•