Bug 1319686 - Remove the use of AutoNoJSAPI from HTMLMediaElement::NotifyAudioChannelAgent
MozReview-Commit-ID: FMKloJPpT93
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -5852,21 +5852,16 @@ HTMLMediaElement::UpdateAudioChannelPlay
mPlayingThroughTheAudioChannel = playingThroughTheAudioChannel;
NotifyAudioChannelAgent(mPlayingThroughTheAudioChannel);
}
}
void
HTMLMediaElement::NotifyAudioChannelAgent(bool aPlaying)
{
- // 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 (aPlaying) {
// The reason we don't call NotifyStartedPlaying after the media element
// really becomes audible is because there is another case needs to block
// element as early as we can, we would hear sound leaking if we block it
// too late. In that case (block autoplay in non-visited-tab), we need to
// create a connection before decoding, because we don't want user hearing
// any sound.
AudioPlaybackConfig config;