Closed Bug 1895358 Opened 5 months ago Closed 5 months ago

Make ManagedContainer management more generic

Categories

(Core :: IPC, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: nika, Assigned: nika)

References

Details

Attachments

(2 files)

In IPDL an actor which manages other actors contains a series of ManagedContainer<PManagedActorSide> objects, which hold a list of managed actors of that type. Because of the type and number of these containers being dependent on the specific protocol, this means that the IPDL logic to add and remove actors from these containers needs to be in generated code.

When refactoring IPDL lifecycles in bug 1724083, this limitation made it harder to clean things up, and effectively led to bug 1893087.

This bug is to change how these ManagedContainer types are implemented to use a generic base class which can be manipulated and accessed from the shared IPDL code, removing the limitation going forward. Various specific generated functions are also re-written to use the generic APIs, reducing the amount of generated code & virtual functions.

This changes the way that StmtCode handles the pattern $,{list} alone on a
line, adjusting it such that each item on the list is printed onto its own
line, and then indented. This helps the formatting of large lists such as the
ones generated in part 2.

This patch adjusts ManagedContainer to have a common base class, and exposes
methods for interacting with this base class from generic code on IProtocol.
This avoids the need for some specialized methods which were previously
required in order to manipulate the managed lists which allows the ordering to
be more precisely controlled in generic actor lifecycle methods.

Depends on D209854

Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3dcf60199c83 Part 1: Improve formatting of long multiline argument lists, r=ipc-reviewers,mccr8 https://hg.mozilla.org/integration/autoland/rev/24ecfabfc330 Part 2: Handle ManagedContainer membership more centrally, r=ipc-reviewers,mccr8
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: