Bug 1290866: Ensure MediaDevices::Allocate's *aOutHandle is properly set to null r=jib

This commit is contained in:
Randell Jesup 2016-08-01 16:26:13 -04:00
parent 02d538afcb
commit 8fd43553fd
4 changed files with 5 additions and 5 deletions

View File

@ -106,7 +106,7 @@ MediaEngineDefaultVideoSource::Allocate(const dom::MediaTrackConstraints &aConst
mOpts.mHeight = c.mHeight.Get(aPrefs.mHeight ? aPrefs.mHeight :
MediaEngine::DEFAULT_43_VIDEO_HEIGHT);
mState = kAllocated;
aOutHandle = nullptr;
*aOutHandle = nullptr;
return NS_OK;
}
@ -415,7 +415,7 @@ MediaEngineDefaultAudioSource::Allocate(const dom::MediaTrackConstraints &aConst
// generate sine wave (default 1KHz)
mSineGenerator = new SineWaveGenerator(AUDIO_RATE,
static_cast<uint32_t>(aPrefs.mFreq ? aPrefs.mFreq : 1000));
aOutHandle = nullptr;
*aOutHandle = nullptr;
return NS_OK;
}

View File

@ -168,7 +168,7 @@ MediaEngineGonkVideoSource::Allocate(const dom::MediaTrackConstraints& aConstrai
}
}
aOutHandle = nullptr;
*aOutHandle = nullptr;
return NS_OK;
}

View File

@ -148,7 +148,7 @@ MediaEngineTabVideoSource::Allocate(const dom::MediaTrackConstraints& aConstrain
mWindowId = aConstraints.mBrowserWindow.WasPassed() ?
aConstraints.mBrowserWindow.Value() : -1;
aOutHandle = nullptr;
*aOutHandle = nullptr;
return Restart(nullptr, aConstraints, aPrefs, aDeviceId, aOutBadConstraint);
}

View File

@ -82,7 +82,7 @@ public:
const char** aOutBadConstraint) override
{
// Nothing to do here, everything is managed in MediaManager.cpp
aOutHandle = nullptr;
*aOutHandle = nullptr;
return NS_OK;
}
nsresult Deallocate(AllocationHandle* aHandle) override