Closed Bug 1109883 Opened 10 years ago Closed 10 years ago

Allow use of high-priority messages for protocol bridging

Categories

(Core :: IPC, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: billm, Assigned: billm)

References

Details

Attachments

(2 files)

Right now we use intr messages for BridgeToChildProcess and LoadPlugin in PContent. This is necessary to ensure that the constructor message for the new top-level actor is dispatched before the reply to the original BridgeToChildProcess/LoadPlugin message. However, if we make the constructor message have high priority, then it would automatically be processed inside BTCP/LoadPlugin and so BTCP/LoadPlugin could just be sync. This would eliminate some re-entrancy problems where any random message now gets processed during this time period (include other LoadPlugin messages).
Right now we don't allow urgent messages (which are one step higher than CPOW messages in priority) to be sent from parent to child. The reason for the restriction is to prevent nested urgent messages, which pose some difficulties.

However, for this bug, it's useful to have urgent messages from parent to child. So this patch makes that possible. It also asserts that we never send a message while we're dispatching an urgent message. That will prevent nested messages.

IPDL still prohibits urgent messages from parent to child. I'm only intending to use them for protocol bridging, which happens a little outside IPDL. So it's unlikely that someone will trip the assertion accidentally (unless they try to set up a protocol bridge from an urgent message handler, which would be very odd).
Attachment #8535829 - Flags: review?(dvander)
This patch uses urgent messages for all bridging and stops using intr for the messages that ask for bridges.
Attachment #8535832 - Flags: review?(bent.mozilla)
Attachment #8535829 - Flags: review?(dvander) → review+
Attachment #8535832 - Flags: review?(bent.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/c4673a7b7168
https://hg.mozilla.org/mozilla-central/rev/dba9d53be4cf
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: