Bug 1022764 - Add #ifdef guards around some WebRTC-specific code in MediaManager.cpp. r=jesup, a=lmandel
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 09 Jun 2014 11:45:14 -0700
changeset 207114 f9b60c46c1ed454f79dbdd442147b341541109aa
parent 207113 d7a5852feb92ce528d3c85c0c1a183f0eab4cc29
child 207115 b110a17ac17b908fedb4f7c007cad77d767d8f68
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, lmandel
bugs1022764
milestone32.0a2
Bug 1022764 - Add #ifdef guards around some WebRTC-specific code in MediaManager.cpp. r=jesup, a=lmandel
dom/media/MediaManager.cpp
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -40,24 +40,23 @@
 #include "nsJSUtils.h"
 #include "nsDOMFile.h"
 #include "nsGlobalWindow.h"
 
 /* Using WebRTC backend on Desktops (Mac, Windows, Linux), otherwise default */
 #include "MediaEngineDefault.h"
 #if defined(MOZ_WEBRTC)
 #include "MediaEngineWebRTC.h"
+#include "browser_logging/WebRtcLog.h"
 #endif
 
 #ifdef MOZ_B2G
 #include "MediaPermissionGonk.h"
 #endif
 
-#include "browser_logging/WebRtcLog.h"
-
 // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
 // GetTickCount() and conflicts with MediaStream::GetCurrentTime.
 #ifdef GetCurrentTime
 #undef GetCurrentTime
 #endif
 
 // XXX Workaround for bug 986974 to maintain the existing broken semantics
 template<>
@@ -1542,17 +1541,19 @@ MediaManager::GetUserMedia(bool aPrivile
       array->AppendElement(callID);
     }
     nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
     nsRefPtr<GetUserMediaRequest> req = new GetUserMediaRequest(aWindow,
                                                                 callID, c, isHTTPS);
     obs->NotifyObservers(req, "getUserMedia:request", nullptr);
   }
 
+#ifdef MOZ_WEBRTC
   EnableWebRtcLog();
+#endif
 
   return NS_OK;
 }
 
 nsresult
 MediaManager::GetUserMediaDevices(nsPIDOMWindow* aWindow,
   const MediaStreamConstraints& aConstraints,
   nsIGetUserMediaDevicesSuccessCallback* aOnSuccess,