Bug 802827 - report Stagefright feature in AppNotes - r=joedrew a=bbajaj
authorBenoit Jacob <bjacob@mozilla.com>
Fri, 21 Dec 2012 17:32:15 -0500
changeset 119163 783e1f5c652ce435277f123c64d14a5a00c4e9d4
parent 119162 a4fe0a12fc2792bced3afa60f536f5eaebf82886
child 119164 31d464929f7c4efbc4dca5e487f568a648b68aa9
push id3088
push userblassey@mozilla.com
push dateWed, 02 Jan 2013 20:32:27 +0000
treeherdermozilla-aurora@783e1f5c652c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoedrew, bbajaj
bugs802827
milestone19.0a2
Bug 802827 - report Stagefright feature in AppNotes - r=joedrew a=bbajaj
content/media/plugins/MediaPluginHost.cpp
--- a/content/media/plugins/MediaPluginHost.cpp
+++ b/content/media/plugins/MediaPluginHost.cpp
@@ -9,16 +9,17 @@
 #include "MediaResource.h"
 #include "nsHTMLMediaElement.h"
 #include "MediaPluginHost.h"
 #include "nsXPCOMStrings.h"
 #include "nsISeekableStream.h"
 #include "pratom.h"
 #include "MediaPluginReader.h"
 #include "nsIGfxInfo.h"
+#include "gfxCrashReporterUtils.h"
 
 #include "MPAPI.h"
 
 using namespace MPAPI;
 
 Decoder::Decoder() :
   mResource(NULL), mPrivate(NULL)
 {
@@ -99,29 +100,33 @@ void MediaPluginHost::TryLoad(const char
   bool disabled =
       Preferences::GetBool("stagefright.disabled", false);
 
   if (disabled) {
     NS_WARNING("XXX stagefright disabled\n");
     return;
   }
 
+  ScopedGfxFeatureReporter reporter("Stagefright", forceEnabled);
+
   if (!forceEnabled) {
     nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
     if (gfxInfo) {
       int32_t status;
       if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_STAGEFRIGHT, &status))) {
         if (status != nsIGfxInfo::FEATURE_NO_INFO) {
           NS_WARNING("XXX stagefright blacklisted\n");
           return;
         }
       }
     }
   }
 
+  reporter.SetSuccessful();
+
   PRLibrary *lib = PR_LoadLibrary(name);
   if (lib) {
     Manifest *manifest = static_cast<Manifest *>(PR_FindSymbol(lib, "MPAPI_MANIFEST"));
     if (manifest)
       mPlugins.AppendElement(manifest);
   }
 }