Bug 910810: don't read prefs off "main" thread in unittests r=abr
authorRandell Jesup <rjesup@jesup.org>
Mon, 14 Oct 2013 14:32:08 -0400
changeset 165471 fa8afb1865a195058c7755703927466b0e5d4bf0
parent 165470 10c7b809dfb161e6aa2b24fececfbee40403f82b
child 165472 75380019dc499a85552e43097c5a1bf68798b209
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersabr
bugs910810
milestone27.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 910810: don't read prefs off "main" thread in unittests r=abr
media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
--- a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
@@ -305,16 +305,17 @@ WebrtcAudioConduit::ConfigureSendMediaCo
     if(error ==  VE_CANNOT_SET_SEND_CODEC || error == VE_CODEC_ERROR)
     {
       return kMediaConduitInvalidSendCodec;
     }
 
     return kMediaConduitUnknownError;
   }
 
+#ifdef MOZILLA_INTERNAL_API
   // TEMPORARY - see bug 694814 comment 2
   nsresult rv;
   nsCOMPtr<nsIPrefService> prefs = do_GetService("@mozilla.org/preferences-service;1", &rv);
   if (NS_SUCCEEDED(rv)) {
     nsCOMPtr<nsIPrefBranch> branch = do_QueryInterface(prefs);
 
     if (branch) {
       int32_t aec = 0; // 0 == unchanged
@@ -326,16 +327,17 @@ WebrtcAudioConduit::ConfigureSendMediaCo
       CSFLogDebug(logTag,"Audio config: aec: %d", aec_on ? aec : -1);
       mEchoOn = aec_on;
       if (static_cast<webrtc::EcModes>(aec) != webrtc::kEcUnchanged)
         mEchoCancel = static_cast<webrtc::EcModes>(aec);
 
       branch->GetIntPref("media.peerconnection.capture_delay", &mCaptureDelay);
     }
   }
+#endif
 
   if (0 != (error = mPtrVoEProcessing->SetEcStatus(mEchoOn, mEchoCancel))) {
     CSFLogError(logTag,"%s Error setting EVStatus: %d ",__FUNCTION__, error);
     return kMediaConduitUnknownError;
   }
 
   //Let's Send Transport State-machine on the Engine
   if(mPtrVoEBase->StartSend(mChannel) == -1)