Bug 1588588: Make this compile when webrtc is disabled. r=ng
authorByron Campen [:bwc] <docfaraday@gmail.com>
Fri, 08 Nov 2019 03:32:33 +0000
changeset 501515 ba56954cac5d0ffa62af08e2c4b107f76749b2c9
parent 501514 8eb793bb132179b2fe866e69cbc53bacd80c14fe
child 501516 b522ac1d75953b4d23693a5396c9128354c695d0
push id114170
push usermalexandru@mozilla.com
push dateTue, 12 Nov 2019 21:58:32 +0000
treeherdermozilla-inbound@9e3f44e87a1a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersng
bugs1588588
milestone72.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 1588588: Make this compile when webrtc is disabled. r=ng Differential Revision: https://phabricator.services.mozilla.com/D50245
dom/media/moz.build
dom/media/webrtc/PWebrtcGlobal.ipdl
dom/media/webrtc/moz.build
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -194,20 +194,16 @@ EXPORTS.mozilla.media.webrtc += [
     'webrtc/WebrtcIPCTraits.h',
 ]
 
 if not CONFIG['MOZ_WEBRTC']:
   EXPORTS.mtransport += [
       '../../media/mtransport/runnable_utils.h',
   ]
 
-IPDL_SOURCES += [
-    'webrtc/PWebrtcGlobal.ipdl',
-]
-
 EXPORTS.mozilla.dom += [
     'AudioDeviceInfo.h',
     'AudioStreamTrack.h',
     'AudioTrack.h',
     'AudioTrackList.h',
     'CanvasCaptureMediaStream.h',
     'GetUserMediaRequest.h',
     'MediaDeviceInfo.h',
--- a/dom/media/webrtc/PWebrtcGlobal.ipdl
+++ b/dom/media/webrtc/PWebrtcGlobal.ipdl
@@ -1,33 +1,39 @@
 /* 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 PContent;
 
+#ifdef MOZ_WEBRTC
 include "mozilla/media/webrtc/WebrtcGlobal.h";
 
 using struct mozilla::dom::RTCStatsReportInternal from "mozilla/dom/RTCStatsReportBinding.h";
 using WebrtcGlobalLog from "mozilla/media/webrtc/WebrtcGlobal.h";
+#endif
 
 namespace mozilla {
 namespace dom {
 
 async protocol PWebrtcGlobal {
   manager PContent;
 
+parent: // child -> parent messages
+  async __delete__();
+#ifdef MOZ_WEBRTC
+  async GetStatsResult(int aRequestId, RTCStatsReportInternal[] aStats);
+  async GetLogResult(int aRequestId, WebrtcGlobalLog aLog);
+
 child: // parent -> child messages
   async GetStatsRequest(int aRequestId, nsString aPcIdFilter);
   async ClearStatsRequest();
   async GetLogRequest(int aRequestId, nsCString aPattern);
   async ClearLogRequest();
   async SetAecLogging(bool aEnable);
   async SetDebugMode(int aLevel);
-
-parent: // child -> parent messages
-  async GetStatsResult(int aRequestId, RTCStatsReportInternal[] aStats);
-  async GetLogResult(int aRequestId, WebrtcGlobalLog aLog);
-  async __delete__();
+#endif
 };
 
 } // end namespace net
 } // end namespace mozilla
+
+
--- a/dom/media/webrtc/moz.build
+++ b/dom/media/webrtc/moz.build
@@ -52,16 +52,17 @@ if CONFIG['MOZ_WEBRTC']:
         '/media/webrtc/signaling/src/common',
         '/media/webrtc/signaling/src/common/browser_logging',
         '/media/webrtc/trunk',
         '/media/webrtc/trunk/webrtc'
     ]
 
 PREPROCESSED_IPDL_SOURCES += [
     'PMediaTransport.ipdl',
+    'PWebrtcGlobal.ipdl',
 ]
 
 XPIDL_SOURCES += [
     'nsITabSource.idl'
 ]
 
 UNIFIED_SOURCES += [
     'MediaEngineDefault.cpp',