Open Bug 1754009 Opened 2 years ago Updated 2 years ago

Re-merge IPDLParamTraits and ParamTraits

Categories

(Core :: IPC, enhancement)

enhancement

Tracking

()

People

(Reporter: nika, Assigned: nika)

References

Details

Back in bug 1440511 I introduced the IPDLParamTraits serialization type, which acts as a parallel serialization trait object to the existing IPC::ParamTraits in order to allow us to pass IProtocol information into IPC serializers. This was necessary for various places where the specific IPDL actor is required in order to serialize IPC objects in order to avoid re-writing existing IPC::ParamTraits implementations.

Unfortunately, this has turned into a bit of pain for us, due to the need to maintain two parallel implementations of ParamTraits in some situations.

My current plan to clean up this logic is to introduce two new types for IPDL serialization: IPC::MessageWriter and IPC::MessageReader. These will replace the [const ]IPC::Message arguments in serializer implementations, and will expose a compatible interface so that calling code generally doesn't need to be changed. The IPC::MessageReader type will also contain the PickleIterator type, removing the need for the extra argument, and the IProtocol* pointer, which will be made optional.

I will use a python script to perform most of the rewriting of these parameters using heuristics, and will fix the remaining cases manually.

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