bug 1088758 - Add the ability to mirror tabs from desktop to a second screen, restrict privledged GuM based on calling compartment rather than passed window's document r=rjesup

This commit is contained in:
Brad Lassey 2014-12-10 09:06:02 -08:00
parent ac785cf41e
commit f6f6e4df7d
2 changed files with 2 additions and 1 deletions

View File

@ -1580,7 +1580,7 @@ MediaManager::GetUserMedia(
NS_ENSURE_TRUE(aOnFailure, NS_ERROR_NULL_POINTER);
NS_ENSURE_TRUE(aOnSuccess, NS_ERROR_NULL_POINTER);
bool privileged = nsContentUtils::IsChromeDoc(aWindow->GetExtantDoc());
bool privileged = nsContentUtils::IsCallerChrome();
nsCOMPtr<nsIDOMGetUserMediaSuccessCallback> onSuccess(aOnSuccess);
nsCOMPtr<nsIDOMGetUserMediaErrorCallback> onFailure(aOnFailure);

View File

@ -713,6 +713,7 @@ SpeechRecognition::Start(const Optional<NonNull<DOMMediaStream>>& aStream, Error
if (aStream.WasPassed()) {
StartRecording(&aStream.Value());
} else {
AutoNoJSAPI();
MediaManager* manager = MediaManager::Get();
manager->GetUserMedia(GetOwner(),
constraints,