From a4058f34b7bf3d38f279de04eb240bfbce6bb8fc Mon Sep 17 00:00:00 2001 From: Michael Froman Date: Wed, 8 Dec 2021 22:49:12 +0000 Subject: [PATCH] Bug 1743707 - fix --disable-webrtc builds due to missing RTCConfigurationBinding.h r=ipc-reviewers,nika Differential Revision: https://phabricator.services.mozilla.com/D133126 --- dom/ipc/ContentChild.cpp | 10 ++-------- dom/ipc/ContentChild.h | 3 ++- dom/ipc/ContentParent.cpp | 10 ++-------- dom/ipc/ContentParent.h | 2 ++ dom/ipc/PContent.ipdl | 6 ++++++ dom/media/webrtc/moz.build | 4 +++- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index a928c7880c91..6dcb09e0ee6a 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -2084,23 +2084,17 @@ bool ContentChild::DeallocPSpeechSynthesisChild(PSpeechSynthesisChild* aActor) { } #endif -PWebrtcGlobalChild* ContentChild::AllocPWebrtcGlobalChild() { #ifdef MOZ_WEBRTC +PWebrtcGlobalChild* ContentChild::AllocPWebrtcGlobalChild() { auto* child = new WebrtcGlobalChild(); return child; -#else - return nullptr; -#endif } bool ContentChild::DeallocPWebrtcGlobalChild(PWebrtcGlobalChild* aActor) { -#ifdef MOZ_WEBRTC delete static_cast(aActor); return true; -#else - return false; -#endif } +#endif mozilla::ipc::IPCResult ContentChild::RecvRegisterChrome( nsTArray&& packages, diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index b3713c14e32e..448599d241b2 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -499,9 +499,10 @@ class ContentChild final : public PContentChild, void GetAvailableDictionaries(nsTArray& aDictionaries); +#ifdef MOZ_WEBRTC PWebrtcGlobalChild* AllocPWebrtcGlobalChild(); - bool DeallocPWebrtcGlobalChild(PWebrtcGlobalChild* aActor); +#endif PContentPermissionRequestChild* AllocPContentPermissionRequestChild( const nsTArray& aRequests, diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index cb8c3e47c1af..a2cdcdcaea88 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -4996,22 +4996,16 @@ void ContentParent::NotifyUpdatedFonts(bool aFullRebuild) { } } -PWebrtcGlobalParent* ContentParent::AllocPWebrtcGlobalParent() { #ifdef MOZ_WEBRTC +PWebrtcGlobalParent* ContentParent::AllocPWebrtcGlobalParent() { return WebrtcGlobalParent::Alloc(); -#else - return nullptr; -#endif } bool ContentParent::DeallocPWebrtcGlobalParent(PWebrtcGlobalParent* aActor) { -#ifdef MOZ_WEBRTC WebrtcGlobalParent::Dealloc(static_cast(aActor)); return true; -#else - return false; -#endif } +#endif mozilla::ipc::IPCResult ContentParent::RecvSetOfflinePermission( const Principal& aPrincipal) { diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 954fec4538a5..842e23a891c5 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -1165,8 +1165,10 @@ class ContentParent final bool DeallocPFileDescriptorSetParent(PFileDescriptorSetParent*); +#ifdef MOZ_WEBRTC PWebrtcGlobalParent* AllocPWebrtcGlobalParent(); bool DeallocPWebrtcGlobalParent(PWebrtcGlobalParent* aActor); +#endif mozilla::ipc::IPCResult RecvUpdateDropEffect(const uint32_t& aDragAction, const uint32_t& aDropEffect); diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index d7717c11664b..935c6eefce1b 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -35,7 +35,9 @@ include protocol PSpeechSynthesis; include protocol PTestShell; include protocol PRemoteSpellcheckEngine; include protocol PWebBrowserPersistDocument; +#ifdef MOZ_WEBRTC include protocol PWebrtcGlobal; +#endif include protocol PWindowGlobal; include protocol PURLClassifier; include protocol PURLClassifierLocal; @@ -451,7 +453,9 @@ sync protocol PContent manages PTestShell; manages PRemoteSpellcheckEngine; manages PWebBrowserPersistDocument; +#ifdef MOZ_WEBRTC manages PWebrtcGlobal; +#endif manages PURLClassifier; manages PURLClassifierLocal; manages PScriptCache; @@ -1054,7 +1058,9 @@ parent: async PMedia(); +#ifdef MOZ_WEBRTC async PWebrtcGlobal(); +#endif async CreateAudioIPCConnection() returns (FileDescOrError fd); diff --git a/dom/media/webrtc/moz.build b/dom/media/webrtc/moz.build index e193261fea7a..f482f616f029 100644 --- a/dom/media/webrtc/moz.build +++ b/dom/media/webrtc/moz.build @@ -55,6 +55,9 @@ if CONFIG["MOZ_WEBRTC"]: SOURCES += [ "MediaEngineWebRTC.cpp", ] + PREPROCESSED_IPDL_SOURCES += [ + "PWebrtcGlobal.ipdl", + ] LOCAL_INCLUDES += [ "..", "/dom/base", @@ -84,7 +87,6 @@ if CONFIG["MOZ_WEBRTC_SIGNALING"]: PREPROCESSED_IPDL_SOURCES += [ "PMediaTransport.ipdl", - "PWebrtcGlobal.ipdl", ] UNIFIED_SOURCES += [