Bug 855570 - Remove WebAudio pref check from Audio Data API deprecation warnings. r=ehsan a=akeybl
authorMatthew Gregan <kinetik@flim.org>
Mon, 20 May 2013 11:13:26 +0800
changeset 142678 45ab407e87471b1a0a4fe478d3d4b849729626b9
parent 142677 a0305227b47a76c188a8533734ece8a0064f926f
child 142679 c177454b9e7414e3746919a6e945e24961c999c7
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, akeybl
bugs855570
milestone23.0a2
Bug 855570 - Remove WebAudio pref check from Audio Data API deprecation warnings. r=ehsan a=akeybl
content/html/content/src/HTMLAudioElement.cpp
content/html/content/src/HTMLMediaElement.cpp
--- a/content/html/content/src/HTMLAudioElement.cpp
+++ b/content/html/content/src/HTMLAudioElement.cpp
@@ -13,17 +13,16 @@
 #include "nsIDocument.h"
 #include "jsfriendapi.h"
 #include "nsContentUtils.h"
 #include "nsJSUtils.h"
 #include "AudioSampleFormat.h"
 #include "AudioChannelCommon.h"
 #include <algorithm>
 #include "mozilla/Preferences.h"
-#include "mozilla/dom/EnableWebAudioCheck.h"
 
 static bool
 IsAudioAPIEnabled()
 {
   return mozilla::Preferences::GetBool("media.audio_data.enabled", true);
 }
 
 NS_IMPL_NS_NEW_HTML_ELEMENT(Audio)
@@ -90,19 +89,17 @@ HTMLAudioElement::Audio(const GlobalObje
 void
 HTMLAudioElement::MozSetup(uint32_t aChannels, uint32_t aRate, ErrorResult& aRv)
 {
   if (!IsAudioAPIEnabled()) {
     aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
     return;
   }
 
-  if (dom::EnableWebAudioCheck::PrefEnabled()) {
-    OwnerDoc()->WarnOnceAbout(nsIDocument::eMozAudioData);
-  }
+  OwnerDoc()->WarnOnceAbout(nsIDocument::eMozAudioData);
 
   // If there is already a src provided, don't setup another stream
   if (mDecoder) {
     aRv.Throw(NS_ERROR_FAILURE);
     return;
   }
 
   // MozWriteAudio divides by mChannels, so validate now.
--- a/content/html/content/src/HTMLMediaElement.cpp
+++ b/content/html/content/src/HTMLMediaElement.cpp
@@ -61,17 +61,16 @@
 #include "nsIDOMNotifyAudioAvailableEvent.h"
 #include "nsMediaFragmentURIParser.h"
 #include "nsURIHashKey.h"
 #include "nsJSUtils.h"
 #include "MediaStreamGraph.h"
 #include "nsIScriptError.h"
 #include "nsHostObjectProtocolHandler.h"
 #include "MediaMetadataManager.h"
-#include "mozilla/dom/EnableWebAudioCheck.h"
 
 #include "AudioChannelService.h"
 
 #include "nsCSSParser.h"
 #include "nsIMediaList.h"
 
 #include "ImageContainer.h"
 #include "nsIPowerManagerService.h"
@@ -3592,19 +3591,17 @@ HTMLMediaElement::MozFragmentEnd()
 NS_IMETHODIMP HTMLMediaElement::GetMozFragmentEnd(double* aTime)
 {
   *aTime = MozFragmentEnd();
   return NS_OK;
 }
 
 void HTMLMediaElement::NotifyAudioAvailableListener()
 {
-  if (dom::EnableWebAudioCheck::PrefEnabled()) {
-    OwnerDoc()->WarnOnceAbout(nsIDocument::eMozAudioData);
-  }
+  OwnerDoc()->WarnOnceAbout(nsIDocument::eMozAudioData);
   if (mDecoder) {
     mDecoder->NotifyAudioAvailableListener();
   }
 }
 
 static double ClampPlaybackRate(double aPlaybackRate)
 {
   if (aPlaybackRate == 0.0) {