Bug 800538: Added MOZ_ASSERTs of passed-in VoiceEngine/VideoEngine in MediaEngineWebRTCAudio/VideoSource constructors respectively. r=jesup

This commit is contained in:
Jan-Ivar Bruaroey 2012-11-28 22:30:31 -05:00
parent a10923fa8b
commit 68777d5651

View File

@ -77,6 +77,7 @@ public:
, mInitDone(false) , mInitDone(false)
, mInSnapshotMode(false) , mInSnapshotMode(false)
, mSnapshotPath(NULL) { , mSnapshotPath(NULL) {
MOZ_ASSERT(aVideoEnginePtr);
mState = kReleased; mState = kReleased;
Init(); Init();
} }
@ -162,14 +163,15 @@ class MediaEngineWebRTCAudioSource : public MediaEngineAudioSource,
public webrtc::VoEMediaProcess public webrtc::VoEMediaProcess
{ {
public: public:
MediaEngineWebRTCAudioSource(webrtc::VoiceEngine* voiceEngine, int aIndex, MediaEngineWebRTCAudioSource(webrtc::VoiceEngine* aVoiceEnginePtr, int aIndex,
const char* name, const char* uuid) const char* name, const char* uuid)
: mVoiceEngine(voiceEngine) : mVoiceEngine(aVoiceEnginePtr)
, mMonitor("WebRTCMic.Monitor") , mMonitor("WebRTCMic.Monitor")
, mCapIndex(aIndex) , mCapIndex(aIndex)
, mChannel(-1) , mChannel(-1)
, mInitDone(false) , mInitDone(false)
, mNullTransport(nullptr) { , mNullTransport(nullptr) {
MOZ_ASSERT(aVoiceEnginePtr);
mState = kReleased; mState = kReleased;
mDeviceName.Assign(NS_ConvertUTF8toUTF16(name)); mDeviceName.Assign(NS_ConvertUTF8toUTF16(name));
mDeviceUUID.Assign(NS_ConvertUTF8toUTF16(uuid)); mDeviceUUID.Assign(NS_ConvertUTF8toUTF16(uuid));