Bug 689598: fix crash reporter on Android r=BenWa
authorDoug Sherk <dsherk@mozilla.com>
Wed, 14 Dec 2011 21:03:11 -0800
changeset 82621 838e8168ea50ac1403f4ccbb4fd88dc7ff25c15b
parent 82620 49b8bec6d175ac0256502d4e1aed40665c1fcaf3
child 82622 dd2e6ce53715c7467022eff5be640b0a8d9564f1
push id21688
push userdsherk@mozilla.com
push dateThu, 15 Dec 2011 05:04:49 +0000
treeherdermozilla-central@fe937bac6e75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBenWa
bugs689598
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 689598: fix crash reporter on Android r=BenWa
widget/src/android/GfxInfo.cpp
widget/src/android/GfxInfo.h
--- a/widget/src/android/GfxInfo.cpp
+++ b/widget/src/android/GfxInfo.cpp
@@ -83,18 +83,16 @@ NS_IMETHODIMP
 GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams)
 {
   return NS_ERROR_FAILURE;
 }
 
 nsresult
 GfxInfo::Init()
 {
-  mSetCrashReportAnnotations = false;
-
   mAdapterDescription.AssignASCII(mozilla::gl::GetVendor());
   if (mozilla::AndroidBridge::Bridge()) {
     nsAutoString str;
 
     mAdapterDescription.Append(NS_LITERAL_STRING(", Model: '"));
     if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "MODEL", str)) {
       mAdapterDeviceID = str;
       mAdapterDescription.Append(str);
@@ -119,16 +117,18 @@ GfxInfo::Init()
         mAdapterDescription.Append(str);
       }
     }
 
     mAdapterDescription.Append(NS_LITERAL_STRING("'"));
     mAndroidSDKVersion = version;
   }
 
+  AddOpenGLCrashReportAnnotations();
+
   return GfxInfoBase::Init();
 }
 
 /* readonly attribute DOMString adapterDescription; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription)
 {
   aAdapterDescription = mAdapterDescription;
@@ -306,21 +306,16 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
   *aStatus = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
   OperatingSystem os = DRIVER_OS_ANDROID;
   if (aOS)
     *aOS = os;
 
   // Don't evaluate special cases when evaluating the downlaoded blocklist.
   if (!aDriverInfo.Length()) {
     if (aFeature == FEATURE_OPENGL_LAYERS) {
-      if (!mSetCrashReportAnnotations) {
-        AddOpenGLCrashReportAnnotations();
-        mSetCrashReportAnnotations = true;
-      }
-
       /* The following code is an old way to whitelist devices when we're ready.
        * It is staying here for reference. The best way to do this now is to add
        * an entry in the list above. There is a dummy entry which will whitelist a
        * device when uncommented and device/vendor IDs are inserted. It is
        * preferred that we stop whitelisting and instead go to blocklisting, where
        * everything is assumed to be okay as long as it's not in the blocklist. */
       // nsAutoString str;
       // /* Whitelist Galaxy S phones */
--- a/widget/src/android/GfxInfo.h
+++ b/widget/src/android/GfxInfo.h
@@ -86,17 +86,16 @@ protected:
                                         nsAString & aSuggestedDriverVersion, 
                                         const nsTArray<GfxDriverInfo>& aDriverInfo,
                                         OperatingSystem* aOS = nsnull);
   virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo();
 
 private:
 
   void     AddOpenGLCrashReportAnnotations();
-  bool     mSetCrashReportAnnotations;
   nsString mRendererIDsString;
   nsString mAdapterRAMString;
 
   nsString mDeviceID;
   nsString mDriverVersion;
   nsString mDriverDate;
   nsString mDeviceKey;