diff --git a/dom/filesystem/PFileSystemRequest.ipdl b/dom/filesystem/PFileSystemRequest.ipdl index 7ed4891cc4fb..43dc7d420f26 100644 --- a/dom/filesystem/PFileSystemRequest.ipdl +++ b/dom/filesystem/PFileSystemRequest.ipdl @@ -62,7 +62,7 @@ union FileSystemResponseValue FileSystemErrorResponse; }; -[ChildImpl="FileSystemTaskChildBase"] +[ChildImpl="mozilla::dom::FileSystemTaskChildBase"] protocol PFileSystemRequest { manager PBackground; diff --git a/dom/indexedDB/PBackgroundIDBCursor.ipdl b/dom/indexedDB/PBackgroundIDBCursor.ipdl index e7669f2554f5..66c73a72ec07 100644 --- a/dom/indexedDB/PBackgroundIDBCursor.ipdl +++ b/dom/indexedDB/PBackgroundIDBCursor.ipdl @@ -79,7 +79,7 @@ union CursorResponse IndexKeyCursorResponse[]; }; -[ChildImpl="indexedDB::BackgroundCursorChildBase", ParentImpl=virtual] +[ChildImpl="mozilla::dom::indexedDB::BackgroundCursorChildBase", ParentImpl=virtual] protocol PBackgroundIDBCursor { manager PBackgroundIDBTransaction or PBackgroundIDBVersionChangeTransaction; diff --git a/dom/indexedDB/PBackgroundIDBDatabase.ipdl b/dom/indexedDB/PBackgroundIDBDatabase.ipdl index 88d5e793926b..2514bfc506b4 100644 --- a/dom/indexedDB/PBackgroundIDBDatabase.ipdl +++ b/dom/indexedDB/PBackgroundIDBDatabase.ipdl @@ -26,7 +26,7 @@ namespace mozilla { namespace dom { namespace indexedDB { -[ChildImpl="indexedDB::BackgroundDatabaseChild", ParentImpl=virtual] +[ChildImpl="mozilla::dom::indexedDB::BackgroundDatabaseChild", ParentImpl=virtual] sync protocol PBackgroundIDBDatabase { manager PBackgroundIDBFactory; diff --git a/dom/indexedDB/PBackgroundIDBFactory.ipdl b/dom/indexedDB/PBackgroundIDBFactory.ipdl index c838189b2ba2..508832662cfe 100644 --- a/dom/indexedDB/PBackgroundIDBFactory.ipdl +++ b/dom/indexedDB/PBackgroundIDBFactory.ipdl @@ -46,7 +46,7 @@ union GetDatabasesResponse DatabaseMetadata[]; }; -[ChildImpl="indexedDB::BackgroundFactoryChild", ParentImpl=virtual] +[ChildImpl="mozilla::dom::indexedDB::BackgroundFactoryChild", ParentImpl=virtual] sync protocol PBackgroundIDBFactory { manager PBackground; diff --git a/dom/indexedDB/PBackgroundIDBFactoryRequest.ipdl b/dom/indexedDB/PBackgroundIDBFactoryRequest.ipdl index d85e7741b514..b8c644389340 100644 --- a/dom/indexedDB/PBackgroundIDBFactoryRequest.ipdl +++ b/dom/indexedDB/PBackgroundIDBFactoryRequest.ipdl @@ -30,7 +30,7 @@ union FactoryRequestResponse DeleteDatabaseRequestResponse; }; -[ManualDealloc, ChildImpl="indexedDB::BackgroundFactoryRequestChild", ParentImpl=virtual] +[ManualDealloc, ChildImpl="mozilla::dom::indexedDB::BackgroundFactoryRequestChild", ParentImpl=virtual] protocol PBackgroundIDBFactoryRequest { manager PBackgroundIDBFactory; diff --git a/dom/indexedDB/PBackgroundIDBRequest.ipdl b/dom/indexedDB/PBackgroundIDBRequest.ipdl index 9b151316551c..09ff0b40ff75 100644 --- a/dom/indexedDB/PBackgroundIDBRequest.ipdl +++ b/dom/indexedDB/PBackgroundIDBRequest.ipdl @@ -160,7 +160,7 @@ union PreprocessResponse ObjectStoreGetAllPreprocessResponse; }; -[ManualDealloc, ChildImpl="indexedDB::BackgroundRequestChild", ParentImpl=virtual] +[ManualDealloc, ChildImpl="mozilla::dom::indexedDB::BackgroundRequestChild", ParentImpl=virtual] protocol PBackgroundIDBRequest { manager PBackgroundIDBTransaction or PBackgroundIDBVersionChangeTransaction; diff --git a/dom/indexedDB/PBackgroundIDBTransaction.ipdl b/dom/indexedDB/PBackgroundIDBTransaction.ipdl index 071e031cb238..7d9447be6c4a 100644 --- a/dom/indexedDB/PBackgroundIDBTransaction.ipdl +++ b/dom/indexedDB/PBackgroundIDBTransaction.ipdl @@ -15,7 +15,7 @@ namespace mozilla { namespace dom { namespace indexedDB { -[ChildImpl="indexedDB::BackgroundTransactionChild", ParentImpl=virtual] +[ChildImpl="mozilla::dom::indexedDB::BackgroundTransactionChild", ParentImpl=virtual] protocol PBackgroundIDBTransaction { manager PBackgroundIDBDatabase; diff --git a/dom/indexedDB/PBackgroundIDBVersionChangeTransaction.ipdl b/dom/indexedDB/PBackgroundIDBVersionChangeTransaction.ipdl index c096c289963d..f54a9505d99b 100644 --- a/dom/indexedDB/PBackgroundIDBVersionChangeTransaction.ipdl +++ b/dom/indexedDB/PBackgroundIDBVersionChangeTransaction.ipdl @@ -15,7 +15,7 @@ namespace mozilla { namespace dom { namespace indexedDB { -[ChildImpl="indexedDB::BackgroundVersionChangeTransactionChild", ParentImpl=virtual] +[ChildImpl="mozilla::dom::indexedDB::BackgroundVersionChangeTransactionChild", ParentImpl=virtual] protocol PBackgroundIDBVersionChangeTransaction { manager PBackgroundIDBDatabase; diff --git a/dom/indexedDB/PBackgroundIndexedDBUtils.ipdl b/dom/indexedDB/PBackgroundIndexedDBUtils.ipdl index fbc51dea65eb..c4f143fb03c5 100644 --- a/dom/indexedDB/PBackgroundIndexedDBUtils.ipdl +++ b/dom/indexedDB/PBackgroundIndexedDBUtils.ipdl @@ -14,7 +14,7 @@ namespace mozilla { namespace dom { namespace indexedDB { -[ManualDealloc, ChildImpl="indexedDB::BackgroundUtilsChild", ParentImpl=virtual] +[ManualDealloc, ChildImpl="mozilla::dom::indexedDB::BackgroundUtilsChild", ParentImpl=virtual] sync protocol PBackgroundIndexedDBUtils { manager PBackground; diff --git a/dom/ipc/PURLClassifierLocal.ipdl b/dom/ipc/PURLClassifierLocal.ipdl index 34aa3ca21427..5b7c81dadbb0 100644 --- a/dom/ipc/PURLClassifierLocal.ipdl +++ b/dom/ipc/PURLClassifierLocal.ipdl @@ -13,7 +13,7 @@ namespace mozilla { namespace dom { -[ManualDealloc, ChildImpl="URLClassifierLocalChild", ParentImpl="URLClassifierLocalParent"] +[ManualDealloc, ChildImpl="mozilla::dom::URLClassifierLocalChild", ParentImpl="mozilla::dom::URLClassifierLocalParent"] protocol PURLClassifierLocal { manager PContent; diff --git a/dom/ipc/PURLClassifierLocalByName.ipdl b/dom/ipc/PURLClassifierLocalByName.ipdl index 372d98e5363d..5a0d64ad985f 100644 --- a/dom/ipc/PURLClassifierLocalByName.ipdl +++ b/dom/ipc/PURLClassifierLocalByName.ipdl @@ -14,7 +14,7 @@ include "mozilla/dom/URLClassifierChild.h"; namespace mozilla { namespace dom { -[ManualDealloc, ChildImpl="URLClassifierLocalByNameChild", ParentImpl="URLClassifierLocalByNameParent"] +[ManualDealloc, ChildImpl="mozilla::dom::URLClassifierLocalByNameChild", ParentImpl="mozilla::dom::URLClassifierLocalByNameParent"] protocol PURLClassifierLocalByName { manager PContent; diff --git a/dom/media/gmp/PChromiumCDM.ipdl b/dom/media/gmp/PChromiumCDM.ipdl index 3f8f11c0f6cb..c6db95a88fbb 100644 --- a/dom/media/gmp/PChromiumCDM.ipdl +++ b/dom/media/gmp/PChromiumCDM.ipdl @@ -19,7 +19,7 @@ using cdm::Status from "GMPSanitizedExports.h"; namespace mozilla { namespace gmp { -[ChildImpl=virtual, ParentImpl="ChromiumCDMParent"] +[ChildImpl=virtual, ParentImpl="mozilla::gmp::ChromiumCDMParent"] async protocol PChromiumCDM { manager PGMPContent; diff --git a/dom/media/gmp/PGMP.ipdl b/dom/media/gmp/PGMP.ipdl index 7df359a6635a..b5c9428c1079 100644 --- a/dom/media/gmp/PGMP.ipdl +++ b/dom/media/gmp/PGMP.ipdl @@ -25,7 +25,7 @@ using mozilla::dom::NativeThreadId from "mozilla/dom/NativeThreadId.h"; namespace mozilla { namespace gmp { -[NeedsOtherPid, NestedUpTo=inside_sync, ChildImpl="GMPChild", ParentImpl="GMPParent", ChildProc=GMPlugin] +[NeedsOtherPid, NestedUpTo=inside_sync, ChildImpl="mozilla::gmp::GMPChild", ParentImpl="mozilla::gmp::GMPParent", ChildProc=GMPlugin] sync protocol PGMP { manages PGMPTimer; diff --git a/dom/media/gmp/PGMPContent.ipdl b/dom/media/gmp/PGMPContent.ipdl index 402cedeaaf23..d1f631a30fcf 100644 --- a/dom/media/gmp/PGMPContent.ipdl +++ b/dom/media/gmp/PGMPContent.ipdl @@ -15,7 +15,7 @@ include "GMPContentChild.h"; namespace mozilla { namespace gmp { -[NeedsOtherPid, ChildImpl="GMPContentChild", ParentImpl=virtual, ParentProc=anydom, ChildProc=GMPlugin] +[NeedsOtherPid, ChildImpl="mozilla::gmp::GMPContentChild", ParentImpl=virtual, ParentProc=anydom, ChildProc=GMPlugin] sync protocol PGMPContent { manages PGMPVideoDecoder; diff --git a/dom/media/gmp/PGMPStorage.ipdl b/dom/media/gmp/PGMPStorage.ipdl index 5370e49ed794..d5a4c98980bb 100644 --- a/dom/media/gmp/PGMPStorage.ipdl +++ b/dom/media/gmp/PGMPStorage.ipdl @@ -12,7 +12,7 @@ using GMPErr from "gmp-errors.h"; namespace mozilla { namespace gmp { -[ChildImpl="GMPStorageChild", ParentImpl=virtual] +[ChildImpl="mozilla::gmp::GMPStorageChild", ParentImpl=virtual] async protocol PGMPStorage { manager PGMP; diff --git a/dom/media/gmp/PGMPTimer.ipdl b/dom/media/gmp/PGMPTimer.ipdl index bef3c42739a5..c1d683c0e9ef 100644 --- a/dom/media/gmp/PGMPTimer.ipdl +++ b/dom/media/gmp/PGMPTimer.ipdl @@ -10,7 +10,7 @@ include "GMPTimerChild.h"; namespace mozilla { namespace gmp { -[ChildImpl="GMPTimerChild", ParentImpl="GMPTimerParent"] +[ChildImpl="mozilla::gmp::GMPTimerChild", ParentImpl="mozilla::gmp::GMPTimerParent"] async protocol PGMPTimer { manager PGMP; diff --git a/dom/media/gmp/PGMPVideoDecoder.ipdl b/dom/media/gmp/PGMPVideoDecoder.ipdl index 50bc52623a4f..0b959e056e0b 100644 --- a/dom/media/gmp/PGMPVideoDecoder.ipdl +++ b/dom/media/gmp/PGMPVideoDecoder.ipdl @@ -14,7 +14,7 @@ include "GMPVideoDecoderChild.h"; namespace mozilla { namespace gmp { -[ChildImpl="GMPVideoDecoderChild", ParentImpl=virtual] +[ChildImpl="mozilla::gmp::GMPVideoDecoderChild", ParentImpl=virtual] async protocol PGMPVideoDecoder { manager PGMPContent; diff --git a/dom/media/gmp/PGMPVideoEncoder.ipdl b/dom/media/gmp/PGMPVideoEncoder.ipdl index 753041f0fa0a..a89b8f3871c6 100644 --- a/dom/media/gmp/PGMPVideoEncoder.ipdl +++ b/dom/media/gmp/PGMPVideoEncoder.ipdl @@ -15,7 +15,7 @@ include "GMPVideoEncoderChild.h"; namespace mozilla { namespace gmp { -[ChildImpl="GMPVideoEncoderChild", ParentImpl=virtual] +[ChildImpl="mozilla::gmp::GMPVideoEncoderChild", ParentImpl=virtual] async protocol PGMPVideoEncoder { manager PGMPContent; diff --git a/dom/media/ipc/PRemoteEncoder.ipdl b/dom/media/ipc/PRemoteEncoder.ipdl index 503f9001d53a..67f176ebc88b 100644 --- a/dom/media/ipc/PRemoteEncoder.ipdl +++ b/dom/media/ipc/PRemoteEncoder.ipdl @@ -54,7 +54,7 @@ union EncodeResultIPDL // The child side runs in the content process, and the parent side runs // in the RDD/utility/GPU processes. We run a separate IPDL thread for both // sides. -[ChildImpl="RemoteMediaDataEncoderChild", ParentImpl="RemoteMediaDataEncoderParent"] +[ChildImpl="mozilla::RemoteMediaDataEncoderChild", ParentImpl="mozilla::RemoteMediaDataEncoderParent"] async protocol PRemoteEncoder { manager PRemoteMediaManager; diff --git a/dom/media/systemservices/PMedia.ipdl b/dom/media/systemservices/PMedia.ipdl index c3d8476b5ff4..bb2fe2694adf 100644 --- a/dom/media/systemservices/PMedia.ipdl +++ b/dom/media/systemservices/PMedia.ipdl @@ -11,7 +11,7 @@ include "mozilla/media/MediaChild.h"; namespace mozilla { namespace media { -[ManualDealloc, ChildImpl="Child", ParentImpl=virtual] +[ManualDealloc, ChildImpl="mozilla::media::Child", ParentImpl=virtual] protocol PMedia { manager PContent; diff --git a/dom/media/webrtc/PMediaTransport.ipdl b/dom/media/webrtc/PMediaTransport.ipdl index 44bb4ae7d51f..1feb9f552220 100644 --- a/dom/media/webrtc/PMediaTransport.ipdl +++ b/dom/media/webrtc/PMediaTransport.ipdl @@ -4,6 +4,9 @@ include protocol PBackground; +include "mozilla/dom/MediaTransportChild.h"; +include "mozilla/dom/MediaTransportParent.h"; + #ifdef MOZ_WEBRTC include WebrtcProxyConfig; @@ -50,7 +53,7 @@ struct IceCandidateAttributePair { }; #endif // MOZ_WEBRTC -[ParentProc=Socket, ChildProc=Content] +[ParentProc=Socket, ChildProc=Content, ParentImpl="mozilla::MediaTransportParent", ChildImpl="mozilla::MediaTransportChild"] async protocol PMediaTransport { #ifdef MOZ_WEBRTC parent: diff --git a/dom/storage/PBackgroundSessionStorageService.ipdl b/dom/storage/PBackgroundSessionStorageService.ipdl index ef6087f0c3c1..e5518ddb2418 100644 --- a/dom/storage/PBackgroundSessionStorageService.ipdl +++ b/dom/storage/PBackgroundSessionStorageService.ipdl @@ -7,7 +7,7 @@ include protocol PBackground; namespace mozilla { namespace dom { -[ChildImpl="SessionStorageService"] +[ChildImpl="mozilla::dom::SessionStorageService"] protocol PBackgroundSessionStorageService { manager PBackground; diff --git a/extensions/spellcheck/ipc/PRemoteSpellcheckEngine.ipdl b/extensions/spellcheck/ipc/PRemoteSpellcheckEngine.ipdl index c327d97e65a1..e979203dc019 100644 --- a/extensions/spellcheck/ipc/PRemoteSpellcheckEngine.ipdl +++ b/extensions/spellcheck/ipc/PRemoteSpellcheckEngine.ipdl @@ -9,7 +9,7 @@ include "mozilla/RemoteSpellCheckEngineChild.h"; namespace mozilla { -[ManualDealloc, ChildImpl="RemoteSpellcheckEngineChild", ParentImpl="RemoteSpellcheckEngineParent"] +[ManualDealloc, ChildImpl="mozilla::RemoteSpellcheckEngineChild", ParentImpl="mozilla::RemoteSpellcheckEngineParent"] sync protocol PRemoteSpellcheckEngine { manager PContent; diff --git a/gfx/layers/ipc/PAPZ.ipdl b/gfx/layers/ipc/PAPZ.ipdl index 1c6b357f1d38..8c972dfbd7f1 100644 --- a/gfx/layers/ipc/PAPZ.ipdl +++ b/gfx/layers/ipc/PAPZ.ipdl @@ -39,7 +39,7 @@ namespace layers { * are implemented. If a new method is needed then PAPZ, APZChild, and RemoteContentController * must be updated to handle it. */ -[ParentImpl="RemoteContentController"] +[ParentImpl="mozilla::layers::RemoteContentController"] sync protocol PAPZ { manager PCompositorBridge; diff --git a/gfx/layers/ipc/PCanvas.ipdl b/gfx/layers/ipc/PCanvas.ipdl index c6b4fed16ce2..88f553b0f9a4 100644 --- a/gfx/layers/ipc/PCanvas.ipdl +++ b/gfx/layers/ipc/PCanvas.ipdl @@ -20,7 +20,7 @@ namespace layers { /** * PCanvas is the IPDL for recorded Canvas drawing. */ -[ParentImpl="CanvasTranslator"] +[ParentImpl="mozilla::layers::CanvasTranslator"] async protocol PCanvas { manager PCanvasManager; diff --git a/gfx/layers/ipc/PCompositorBridge.ipdl b/gfx/layers/ipc/PCompositorBridge.ipdl index 225651dd7b73..56cf8e512a73 100644 --- a/gfx/layers/ipc/PCompositorBridge.ipdl +++ b/gfx/layers/ipc/PCompositorBridge.ipdl @@ -82,7 +82,7 @@ struct FrameStats { * protocol, which is per-browser. A lot of the functions in the protocol are * basically multiplexing/demultiplexing stuff in PLayerTransaction. */ -[ParentImpl="CompositorBridgeParentBase"] +[ParentImpl="mozilla::layers::CompositorBridgeParentBase"] sync protocol PCompositorBridge { manager PCompositorManager; diff --git a/gfx/vr/ipc/PVR.ipdl b/gfx/vr/ipc/PVR.ipdl index 74574febf07d..4be8870ca088 100644 --- a/gfx/vr/ipc/PVR.ipdl +++ b/gfx/vr/ipc/PVR.ipdl @@ -18,7 +18,7 @@ include protocol PVRGPU; namespace mozilla { namespace gfx { -[NeedsOtherPid, ChildImpl="VRChild", ParentImpl="VRParent", ParentProc=VR, ChildProc=Parent] +[NeedsOtherPid, ChildImpl="mozilla::gfx::VRChild", ParentImpl="mozilla::gfx::VRParent", ParentProc=VR, ChildProc=Parent] async protocol PVR { parent: diff --git a/gfx/vr/ipc/PVRGPU.ipdl b/gfx/vr/ipc/PVRGPU.ipdl index 783515e66053..3c99fca3ff49 100644 --- a/gfx/vr/ipc/PVRGPU.ipdl +++ b/gfx/vr/ipc/PVRGPU.ipdl @@ -10,7 +10,7 @@ namespace gfx { // The parent process is the VR process. // The child process is the GPU process. -[NeedsOtherPid, ChildImpl="VRGPUChild", ParentImpl="VRGPUParent", ParentProc=VR, ChildProc=GPU] +[NeedsOtherPid, ChildImpl="mozilla::gfx::VRGPUChild", ParentImpl="mozilla::gfx::VRGPUParent", ParentProc=VR, ChildProc=GPU] async protocol PVRGPU { parent: @@ -24,4 +24,4 @@ child: }; } // gfx -} // mozilla \ No newline at end of file +} // mozilla diff --git a/gfx/vr/ipc/PVRLayer.ipdl b/gfx/vr/ipc/PVRLayer.ipdl index c96a2a7542a0..80a2294f1d1e 100644 --- a/gfx/vr/ipc/PVRLayer.ipdl +++ b/gfx/vr/ipc/PVRLayer.ipdl @@ -13,7 +13,7 @@ using mozilla::gfx::Rect from "mozilla/gfx/Rect.h"; namespace mozilla { namespace gfx { -[ChildImpl="VRLayerChild", ParentImpl=virtual] +[ChildImpl="mozilla::gfx::VRLayerChild", ParentImpl=virtual] async protocol PVRLayer { manager PVRManager; diff --git a/gfx/vr/ipc/PVRManager.ipdl b/gfx/vr/ipc/PVRManager.ipdl index 9bfc94276352..b4f01ac49783 100644 --- a/gfx/vr/ipc/PVRManager.ipdl +++ b/gfx/vr/ipc/PVRManager.ipdl @@ -31,7 +31,7 @@ namespace gfx { * enumeration and sensor state between the compositor thread and * content threads/processes. */ -[NeedsOtherPid, ChildImpl="VRManagerChild", ParentImpl="VRManagerParent", ParentProc=compositor, ChildProc=anydom] +[NeedsOtherPid, ChildImpl="mozilla::gfx::VRManagerChild", ParentImpl="mozilla::gfx::VRManagerParent", ParentProc=compositor, ChildProc=anydom] sync protocol PVRManager { manages PVRLayer; diff --git a/ipc/ipdl/ipdl/lower.py b/ipc/ipdl/ipdl/lower.py index 006ca50ee8e1..57a6970a7962 100644 --- a/ipc/ipdl/ipdl/lower.py +++ b/ipc/ipdl/ipdl/lower.py @@ -3246,6 +3246,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor): self.cppfile = None self.ns = None self.cls = None + self.concreteActorType = None self.protocolCxxIncludes = [] self.actorForwardDecls = [] self.usingDecls = [] @@ -3356,18 +3357,6 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor): self.hdrfile.addthings([traitsdecl, Whitespace.NL] + _includeGuardEnd(hf)) - # If the implementation type is not overridden, add an implicit import - # for the default implementation header file. Explicit implementation - # types will specify their headers manually with `include`. - if self.protocol.implAttribute(self.side) is None: - assert self.protocol.name.startswith("P") - self.externalIncludes.add( - "".join(n.name + "/" for n in self.protocol.namespaces) - + self.protocol.name[1:] - + self.side.capitalize() - + ".h" - ) - # make the .cpp file cf.addthings( [ @@ -3520,6 +3509,30 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor): Whitespace.NL, ]) + implAttr = self.protocol.implAttribute(self.side) + if implAttr is None: + assert self.protocol.name.startswith("P") + pqname = self.protocol.qname() + self.concreteActorType = ipdl.ast.QualifiedId( + pqname.loc, pqname.baseid[1:] + self.side.title(), pqname.quals + ) + + # If the implementation type is not overridden, add an implicit + # import for the default implementation header file. Explicit + # implementation types will specify their headers manually with + # `include`. + self.externalIncludes.add( + "/".join( + self.concreteActorType.quals + + [self.concreteActorType.baseid + ".h"] + ) + ) + elif implAttr != "virtual": + parts = implAttr.value.split("::") + self.concreteActorType = ipdl.ast.QualifiedId( + implAttr.loc, parts[-1], parts[:-1] + ) + self.cls = Class(self.clsname, inherits=inherits, abstract=True) self.cls.addstmt(Label.PRIVATE) @@ -3604,7 +3617,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor): defaultRecv = MethodDefn(recvDecl) defaultRecv.addcode("return IPC_OK();\n") self.cls.addstmt(defaultRecv) - elif self.protocol.implAttribute(self.side) == "virtual": + elif self.concreteActorType is None: # If we're using virtual calls, we need the methods to be # declared on the base class. recvDecl.methodspec = MethodSpec.PURE @@ -3612,7 +3625,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor): # If we're using virtual calls, we need the methods to be declared on # the base class. - if self.protocol.implAttribute(self.side) == "virtual": + if self.concreteActorType is None: for md in p.messageDecls: managed = md.decl.type.constructedType() if not ptype.isManagerOf(managed) or md.decl.type.isDtor(): @@ -4287,18 +4300,11 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor): ## def concreteThis(self): - implAttr = self.protocol.implAttribute(self.side) - if implAttr == "virtual": + if self.concreteActorType is None: return ExprVar.THIS - - if implAttr is None: - assert self.protocol.name.startswith("P") - className = self.protocol.name[1:] + self.side.capitalize() - else: - assert isinstance(implAttr, ipdl.ast.StringLiteral) - className = implAttr.value - - return ExprCode("static_cast<${className}*>(this)", className=className) + return ExprCast( + ExprVar.THIS, Type(str(self.concreteActorType), ptr=True), static=True + ) def thisCall(self, function, args): return ExprCall(ExprSelect(self.concreteThis(), "->", function), args=args) diff --git a/ipc/testshell/PTestShellCommand.ipdl b/ipc/testshell/PTestShellCommand.ipdl index 9c02b7c4c9e5..fb5d8b4c89d9 100644 --- a/ipc/testshell/PTestShellCommand.ipdl +++ b/ipc/testshell/PTestShellCommand.ipdl @@ -9,7 +9,7 @@ include "mozilla/ipc/TestShellParent.h"; namespace mozilla { namespace ipc { -[ManualDealloc, ChildImpl=virtual, ParentImpl="TestShellCommandParent"] +[ManualDealloc, ChildImpl=virtual, ParentImpl="mozilla::ipc::TestShellCommandParent"] protocol PTestShellCommand { manager PTestShell; diff --git a/js/xpconnect/loader/PScriptCache.ipdl b/js/xpconnect/loader/PScriptCache.ipdl index 3e11bfdae34c..7ec24e891b61 100644 --- a/js/xpconnect/loader/PScriptCache.ipdl +++ b/js/xpconnect/loader/PScriptCache.ipdl @@ -21,7 +21,7 @@ struct ScriptData { uint8_t[] xdrData; }; -[ManualDealloc, ChildImpl="ScriptCacheChild", ParentImpl="ScriptCacheParent"] +[ManualDealloc, ChildImpl="mozilla::loader::ScriptCacheChild", ParentImpl="mozilla::loader::ScriptCacheParent"] protocol PScriptCache { manager PContent; diff --git a/netwerk/protocol/websocket/PTransportProvider.ipdl b/netwerk/protocol/websocket/PTransportProvider.ipdl index 26885c911c43..5da9fcbd31d0 100644 --- a/netwerk/protocol/websocket/PTransportProvider.ipdl +++ b/netwerk/protocol/websocket/PTransportProvider.ipdl @@ -15,7 +15,7 @@ namespace net { * again. Hence there's no need for any messages on the protocol itself. */ -[ManualDealloc, ChildImpl="TransportProviderChild", ParentImpl="TransportProviderParent"] +[ManualDealloc, ChildImpl="mozilla::net::TransportProviderChild", ParentImpl="mozilla::net::TransportProviderParent"] async protocol PTransportProvider { manager PNecko; diff --git a/netwerk/protocol/websocket/PWebSocket.ipdl b/netwerk/protocol/websocket/PWebSocket.ipdl index dbe764be87f1..91cba338733f 100644 --- a/netwerk/protocol/websocket/PWebSocket.ipdl +++ b/netwerk/protocol/websocket/PWebSocket.ipdl @@ -17,7 +17,7 @@ using class IPC::SerializedLoadContext from "SerializedLoadContext.h"; namespace mozilla { namespace net { -[ManualDealloc, ChildImpl="WebSocketChannelChild", ParentImpl="WebSocketChannelParent"] +[ManualDealloc, ChildImpl="mozilla::net::WebSocketChannelChild", ParentImpl="mozilla::net::WebSocketChannelParent"] async protocol PWebSocket { manager PNecko;