Closed Bug 1553270 Opened 5 years ago Closed 5 years ago

Add a protocol name getter to IProtocol

Categories

(Core :: IPC, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: nika, Assigned: nika)

References

Details

Attachments

(2 files, 1 obsolete file)

This should allow for some better diagnostics around actors. For example, this should allow us to print out the name of the actor within IPC-generated warnings.

This patch also changes the protocol type & name getters to be non-virtual such that they can be used in IProtocol's destructor as well.

This allows for the getter to be used in IProtocol's destructor, and generally
brings IProtocol more in line with IToplevelProtocol.

The vast majority of the virtual methods which were used on ProtocolState were
actually methods which only had meaningful implementations on the toplevel
protocol. This patch adds a new field to IProtocol holding a direct pointer to
the protocol's IToplevelProtocol, and the methods formerly implemented with
ProtocolState now directly call the corresponding method on IToplevelProtocol.
IToplevelProtocol then shadows these methods with the toplevel protocol
implementation, meaning that the right code is run in the right places.

In addition, some state was maintained for protocols inside of the separate
ProtocolState allocation, and this patch moves that state back into the actor
itself.

Comment on attachment 9066511 [details]
Bug 1553270 - Eliminate the unnecessary ProtocolState object,

Revision D32044 was moved to bug 1553272. Setting attachment 9066511 [details] to obsolete.

Attachment #9066511 - Attachment is obsolete: true
Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c93779f1157a
Part 1: Store the protocol ID on IProtocol directly, r=froydnj
https://hg.mozilla.org/integration/autoland/rev/15293a40e833
Part 2: Allow getting a protocol's name from its ProtocolID, r=froydnj
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: