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
Родитель a71f6ccb8c
Коммит a6571098ba
2 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -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,