зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1709484 Move eUseCounter_custom_MozGetUserMediaInsec from mozGetUserMediaDevices to mozGetUserMedia r=jib
Differential Revision: https://phabricator.services.mozilla.com/D114291
This commit is contained in:
Родитель
154e0379e9
Коммит
57e201057c
|
@ -1283,6 +1283,11 @@ void Navigator::MozGetUserMedia(const MediaStreamConstraints& aConstraints,
|
|||
aRv.ThrowInvalidStateError("The document is not fully active.");
|
||||
return;
|
||||
}
|
||||
if (Document* doc = mWindow->GetExtantDoc()) {
|
||||
if (!mWindow->IsSecureContext()) {
|
||||
doc->SetUseCounter(eUseCounter_custom_MozGetUserMediaInsec);
|
||||
}
|
||||
}
|
||||
RefPtr<MediaManager::StreamPromise> sp;
|
||||
if (!MediaManager::IsOn(aConstraints.mVideo) &&
|
||||
!MediaManager::IsOn(aConstraints.mAudio)) {
|
||||
|
@ -1329,11 +1334,6 @@ void Navigator::MozGetUserMediaDevices(
|
|||
aRv.Throw(NS_ERROR_NOT_AVAILABLE);
|
||||
return;
|
||||
}
|
||||
if (Document* doc = mWindow->GetExtantDoc()) {
|
||||
if (!mWindow->IsSecureContext()) {
|
||||
doc->SetUseCounter(eUseCounter_custom_MozGetUserMediaInsec);
|
||||
}
|
||||
}
|
||||
RefPtr<MediaManager> manager = MediaManager::Get();
|
||||
// XXXbz aOnError seems to be unused?
|
||||
nsCOMPtr<nsPIDOMWindowInner> window(mWindow);
|
||||
|
|
Загрузка…
Ссылка в новой задаче