mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1290866: Ensure MediaDevices::Allocate's *aOutHandle is properly set to null r=jib
This commit is contained in:
parent
02d538afcb
commit
8fd43553fd
@ -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;
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ MediaEngineGonkVideoSource::Allocate(const dom::MediaTrackConstraints& aConstrai
|
||||
}
|
||||
}
|
||||
|
||||
aOutHandle = nullptr;
|
||||
*aOutHandle = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user