Bug 1521879 - Part 3: Get --disable-webrtc builds working. r=mjf
authorByron Campen [:bwc] <docfaraday@gmail.com>
Mon, 25 Feb 2019 21:51:23 +0000
changeset 518883 1f06f1722fb4ad1198e8e5fb888126a852bfb7a9
parent 518882 92aca26a32044148d827ef27cced50f36f86a7e1
child 518884 9ab737c1a29a9fd4f043069c22413fc4f7c977e8
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjf
bugs1521879
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1521879 - Part 3: Get --disable-webrtc builds working. r=mjf Differential Revision: https://phabricator.services.mozilla.com/D17275
dom/media/webrtc/MediaTransportChild.h
dom/media/webrtc/MediaTransportParent.h
dom/media/webrtc/PMediaTransport.ipdl
dom/media/webrtc/RTCCertificate.cpp
dom/media/webrtc/RTCCertificate.h
dom/media/webrtc/moz.build
--- a/dom/media/webrtc/MediaTransportChild.h
+++ b/dom/media/webrtc/MediaTransportChild.h
@@ -7,16 +7,17 @@
 
 #include "mozilla/dom/PMediaTransportChild.h"
 
 namespace mozilla {
 class MediaTransportHandlerIPC;
 
 class MediaTransportChild : public dom::PMediaTransportChild {
  public:
+#ifdef MOZ_WEBRTC
   explicit MediaTransportChild(MediaTransportHandlerIPC* aUser);
   virtual ~MediaTransportChild();
   mozilla::ipc::IPCResult RecvOnCandidate(const string& transportId,
                                           const CandidateInfo& candidateInfo);
   mozilla::ipc::IPCResult RecvOnAlpnNegotiated(const string& alpn);
   mozilla::ipc::IPCResult RecvOnGatheringStateChange(const int& state);
   mozilla::ipc::IPCResult RecvOnConnectionStateChange(const int& state);
   mozilla::ipc::IPCResult RecvOnPacketReceived(const string& transportId,
@@ -25,12 +26,13 @@ class MediaTransportChild : public dom::
                                                  const MediaPacket& packet);
   mozilla::ipc::IPCResult RecvOnStateChange(const string& transportId,
                                             const int& state);
   mozilla::ipc::IPCResult RecvOnRtcpStateChange(const string& transportId,
                                                 const int& state);
 
  private:
   RefPtr<MediaTransportHandlerIPC> mUser;
+#endif  // MOZ_WEBRTC
 };
 
 }  // namespace mozilla
 #endif
--- a/dom/media/webrtc/MediaTransportParent.h
+++ b/dom/media/webrtc/MediaTransportParent.h
@@ -7,16 +7,17 @@
 
 #include "mozilla/dom/PMediaTransportParent.h"
 #include <memory>
 
 namespace mozilla {
 
 class MediaTransportParent : public dom::PMediaTransportParent {
  public:
+#ifdef MOZ_WEBRTC
   MediaTransportParent();
   virtual ~MediaTransportParent();
 
   mozilla::ipc::IPCResult RecvGetIceLog(const nsCString& pattern,
                                         GetIceLogResolver&& aResolve);
   mozilla::ipc::IPCResult RecvClearIceLog();
   mozilla::ipc::IPCResult RecvEnterPrivateMode();
   mozilla::ipc::IPCResult RecvExitPrivateMode();
@@ -52,11 +53,12 @@ class MediaTransportParent : public dom:
       const RTCStatsReportInternal& reportIn, GetIceStatsResolver&& aResolve);
 
   void ActorDestroy(ActorDestroyReason aWhy);
 
  private:
   // Hide the sigslot/MediaTransportHandler stuff from IPC.
   class Impl;
   std::unique_ptr<Impl> mImpl;
+#endif  // MOZ_WEBRTC
 };
 }  // namespace mozilla
 #endif  //_MTRANSPORTHANDLER_PARENT_H__
--- a/dom/media/webrtc/PMediaTransport.ipdl
+++ b/dom/media/webrtc/PMediaTransport.ipdl
@@ -1,13 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PSocketProcessBridge;
+
+#ifdef MOZ_WEBRTC
 include PBrowserOrId;
 
 // ParamTraits stuff for generated code and other classes we don't want to change
 include "mozilla/media/webrtc/WebrtcIPCTraits.h";
 using StringVector from "mozilla/media/webrtc/WebrtcIPCTraits.h";
 using CandidateInfo from "mozilla/media/webrtc/WebrtcIPCTraits.h";
 using DtlsDigestList from "mozilla/media/webrtc/WebrtcIPCTraits.h";
 using std::string from "ipc/IPCMessageUtils.h";
@@ -15,25 +17,28 @@ using struct mozilla::dom::RTCStatsRepor
 using struct mozilla::dom::MovableRTCStatsReportInternal from "mozilla/media/webrtc/WebrtcGlobal.h";
 using WebrtcGlobalLog from "mozilla/media/webrtc/WebrtcGlobal.h";
 using mozilla::dom::RTCIceServer from "mozilla/dom/RTCConfigurationBinding.h";
 using mozilla::dom::RTCIceTransportPolicy from "mozilla/dom/RTCConfigurationBinding.h";
 
 // ParamTraits stuff for our own classes
 using MediaPacket from "mtransport/mediapacket.h";
 using net::NrIceStunAddrArray from "mozilla/net/PStunAddrsParams.h";
+#endif // MOZ_WEBRTC
 
 namespace mozilla {
 namespace dom {
 
 async protocol PMediaTransport {
   manager PSocketProcessBridge;
 
 parent:
   async __delete__();
+
+#ifdef MOZ_WEBRTC
   async GetIceLog(nsCString pattern) returns (WebrtcGlobalLog loglines);
   async ClearIceLog();
   async EnterPrivateMode();
   async ExitPrivateMode();
 
   async CreateIceCtx(string name,
                      RTCIceServer[] iceServers,
                      RTCIceTransportPolicy icePolicy);
@@ -83,11 +88,13 @@ child:
   async OnCandidate(string transportId, CandidateInfo candidateInfo);
   async OnAlpnNegotiated(string alpn);
   async OnGatheringStateChange(int state);
   async OnConnectionStateChange(int state);
   async OnPacketReceived(string transportId, MediaPacket packet);
   async OnEncryptedSending(string transportId, MediaPacket packet);
   async OnStateChange(string transportId, int state);
   async OnRtcpStateChange(string transportId, int state);
+
+#endif // MOZ_WEBRTC
 };
 } // namespace dom
 } // namespace mozilla
--- a/dom/media/webrtc/RTCCertificate.cpp
+++ b/dom/media/webrtc/RTCCertificate.cpp
@@ -10,16 +10,17 @@
 #include "cert.h"
 #include "jsapi.h"
 #include "mozilla/dom/CryptoKey.h"
 #include "mozilla/dom/RTCCertificateBinding.h"
 #include "mozilla/dom/WebCryptoCommon.h"
 #include "mozilla/dom/WebCryptoTask.h"
 #include "mozilla/Move.h"
 #include "mozilla/Sprintf.h"
+#include "mtransport/dtlsidentity.h"
 
 #include <cstdio>
 
 namespace mozilla {
 namespace dom {
 
 #define RTCCERTIFICATE_SC_VERSION 0x00000001
 
--- a/dom/media/webrtc/RTCCertificate.h
+++ b/dom/media/webrtc/RTCCertificate.h
@@ -14,21 +14,21 @@
 #include "sslt.h"
 #include "ScopedNSSTypes.h"
 
 #include "mozilla/ErrorResult.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/dom/CryptoKey.h"
 #include "mozilla/dom/RTCCertificateBinding.h"
-#include "mtransport/dtlsidentity.h"
 #include "js/StructuredClone.h"
 #include "js/TypeDecls.h"
 
 namespace mozilla {
+class DtlsIdentity;
 namespace dom {
 
 class ObjectOrString;
 
 class RTCCertificate final : public nsISupports, public nsWrapperCache {
  public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(RTCCertificate)
--- a/dom/media/webrtc/moz.build
+++ b/dom/media/webrtc/moz.build
@@ -48,19 +48,19 @@ if CONFIG['MOZ_WEBRTC']:
         '/dom/media',
         '/media/libyuv/libyuv/include',
         '/media/webrtc/signaling/src/common',
         '/media/webrtc/signaling/src/common/browser_logging',
         '/media/webrtc/trunk',
         '/media/webrtc/trunk/webrtc'
     ]
 
-    IPDL_SOURCES += [
-        'PMediaTransport.ipdl',
-    ]
+PREPROCESSED_IPDL_SOURCES += [
+    'PMediaTransport.ipdl',
+]
 
 XPIDL_SOURCES += [
     'nsITabSource.idl'
 ]
 
 UNIFIED_SOURCES += [
     'MediaEngineDefault.cpp',
     'MediaEngineSource.cpp',