mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1715755 - Part 1: Don't ignore dead actors for sync and intr messages, r=handyman
When this change was first implemented, it ignored dead actors for all types of messages, but for messages with replies they cannot be ignored, as a reply must be sent. This should fix that oversight. Differential Revision: https://phabricator.services.mozilla.com/D123148
This commit is contained in:
parent
44f360b272
commit
e3b52f319a
@ -4047,14 +4047,23 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
||||
return method
|
||||
|
||||
if dispatches:
|
||||
if hasReply:
|
||||
ondeadactor = [StmtReturn(_Result.RouteError)]
|
||||
else:
|
||||
ondeadactor = [
|
||||
self.logMessage(
|
||||
None, ExprAddrOf(msgvar), "Ignored message for dead actor"
|
||||
),
|
||||
StmtReturn(_Result.Processed),
|
||||
]
|
||||
|
||||
method.addcode(
|
||||
"""
|
||||
int32_t route__ = ${msgvar}.routing_id();
|
||||
if (MSG_ROUTING_CONTROL != route__) {
|
||||
IProtocol* routed__ = Lookup(route__);
|
||||
if (!routed__ || !routed__->GetLifecycleProxy()) {
|
||||
${logignored}
|
||||
return MsgProcessed;
|
||||
$*{ondeadactor}
|
||||
}
|
||||
|
||||
RefPtr<mozilla::ipc::ActorLifecycleProxy> proxy__ =
|
||||
@ -4064,9 +4073,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
||||
|
||||
""",
|
||||
msgvar=msgvar,
|
||||
logignored=self.logMessage(
|
||||
None, ExprAddrOf(msgvar), "Ignored message for dead actor"
|
||||
),
|
||||
ondeadactor=ondeadactor,
|
||||
name=name,
|
||||
args=[p.name for p in params],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user