Bug 1338538 - Remove AutoNoJSAPI in HTMLMediaElement, r=alwu draft
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 13 Feb 2017 15:40:28 +0100
changeset 485851 a27fee22864b8a3deca22d83c46c77e4fa569435
parent 485850 78e972ac105d9eb9e4a01961cb543bc5976539a9
child 485852 070697e2159515ee2713751fde5d4e2fcbc2d837
push id45870
push userbmo:kechen@mozilla.com
push dateFri, 17 Feb 2017 09:36:54 +0000
reviewersalwu
bugs1338538
milestone54.0a1
Bug 1338538 - Remove AutoNoJSAPI in HTMLMediaElement, r=alwu
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -850,21 +850,16 @@ private:
     return true;
   }
 
   void
   NotifyAudioChannelAgent(bool aPlaying)
   {
     MOZ_ASSERT(mAudioChannelAgent);
 
-    // 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) {
       AudioPlaybackConfig config;
       nsresult rv = mAudioChannelAgent->NotifyStartedPlaying(&config,
                                                              IsOwnerAudible());
       if (NS_WARN_IF(NS_FAILED(rv))) {
         return;
       }