Commit 67b390b0 authored by Karl Tomlinson's avatar Karl Tomlinson
Browse files

Bug 1709484 Move eUseCounter_custom_MozGetUserMediaInsec from...

Bug 1709484 Move eUseCounter_custom_MozGetUserMediaInsec from mozGetUserMediaDevices to mozGetUserMedia r=jib

Differential Revision: https://phabricator.services.mozilla.com/D114291
parent dd6cff69
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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);