Bug 1001383 - HTMLMediaElement::UpdateAudioChannelPlayingState() should use system principal because calling AudioChannel API, r=bz

This commit is contained in:
Andrea Marchesini 2014-04-28 11:22:16 +01:00
Родитель 2e43b0c9d2
Коммит c15c9f6bc6
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -3848,6 +3848,11 @@ void HTMLMediaElement::UpdateAudioChannelPlayingState()
mAudioChannelAgent->SetVisibilityState(!OwnerDoc()->Hidden());
}
// This is needed to pass nsContentUtils::IsCallerChrome().
// AudioChannel API should not called from content but it can happen that
// this method has some content JS in its stack.
AutoNoJSAPI nojsapi;
if (mPlayingThroughTheAudioChannel) {
int32_t canPlay;
mAudioChannelAgent->StartPlaying(&canPlay);