diff --git a/ipc/ipdl/ipdl/lower.py b/ipc/ipdl/ipdl/lower.py index f4a65413e29..36073e9c6b6 100644 --- a/ipc/ipdl/ipdl/lower.py +++ b/ipc/ipdl/ipdl/lower.py @@ -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(): diff --git a/ipc/ipdl/test/cxx/PTestBridgeMain.ipdl b/ipc/ipdl/test/cxx/PTestBridgeMain.ipdl index 93e905dd4dc..77b9024bf1e 100644 --- a/ipc/ipdl/test/cxx/PTestBridgeMain.ipdl +++ b/ipc/ipdl/test/cxx/PTestBridgeMain.ipdl @@ -7,6 +7,7 @@ namespace _ipdltest { protocol PTestBridgeMain { child spawns PTestBridgeSub; + child opens PTestBridgeMainSub; child: Start(); diff --git a/ipc/ipdl/test/cxx/TestBridgeMain.h b/ipc/ipdl/test/cxx/TestBridgeMain.h index 170f2127359..43d01fb90e6 100644 --- a/ipc/ipdl/test/cxx/TestBridgeMain.h +++ b/ipc/ipdl/test/cxx/TestBridgeMain.h @@ -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;