Bug 1133748 - Fix ipdl code for bridged protocols that are also opened. r=billm.

This commit is contained in:
Peter Van der Beken 2015-02-09 21:54:12 +01:00
parent 5a6cb5d9a7
commit 0c012f6ea5
3 changed files with 13 additions and 1 deletions

View File

@ -4,6 +4,7 @@
import os, re, sys
from copy import deepcopy
from collections import OrderedDict
import ipdl.ast
import ipdl.builtin
@ -2780,7 +2781,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
bridgeActorsCreated = ProcessGraph.bridgeEndpointsOf(ptype, self.side)
opensActorsCreated = ProcessGraph.opensEndpointsOf(ptype, self.side)
channelOpenedActors = bridgeActorsCreated + opensActorsCreated
channelOpenedActors = OrderedDict.fromkeys(bridgeActorsCreated + opensActorsCreated, None)
friends = _FindFriends().findFriends(ptype)
if ptype.isManaged():

View File

@ -7,6 +7,7 @@ namespace _ipdltest {
protocol PTestBridgeMain {
child spawns PTestBridgeSub;
child opens PTestBridgeMainSub;
child:
Start();

View File

@ -72,6 +72,16 @@ public:
protected:
virtual bool RecvStart() MOZ_OVERRIDE;
virtual PTestBridgeMainSubChild*
AllocPTestBridgeMainSubChild(Transport* transport,
ProcessId otherProcess) MOZ_OVERRIDE
{
// This shouldn't be called. It's just a byproduct of testing that
// the right code is generated for a bridged protocol that's also
// opened, but we only test bridging here.
MOZ_CRASH();
}
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
IPDLUnitTestSubprocess* mSubprocess;