Backed out changeset 432a30ebd148
authorBenoit Jacob <bjacob@mozilla.com>
Sun, 18 Sep 2011 21:29:08 -0400
changeset 77612 b916b514a499416d0065991c50888c81845121d1
parent 77611 432a30ebd148aaacd1615d4188afab44742c6c52
child 77613 bb708067dd5715d9f9be19916a92b970617134e8
push idunknown
push userunknown
push dateunknown
milestone9.0a1
backs out432a30ebd148aaacd1615d4188afab44742c6c52
Backed out changeset 432a30ebd148
widget/public/nsIGfxInfo.idl
widget/src/xpwidgets/GfxInfoBase.h
widget/src/xpwidgets/GfxInfoX11.h
widget/src/xpwidgets/nsBaseWidget.cpp
--- a/widget/public/nsIGfxInfo.idl
+++ b/widget/public/nsIGfxInfo.idl
@@ -138,13 +138,10 @@ interface nsIGfxInfo : nsISupports
   DOMString getFeatureSuggestedDriverVersion(in long aFeature);
 
   /**
    * WebGL info; valid params are "full-renderer", "vendor", "renderer", "version",
    * "shading_language_version", "extensions".  These return info from
    * underlying GL impl that's used to implement WebGL.
    */
   DOMString getWebGLParameter(in DOMString aParam);
-
-  // only useful on X11
-  [noscript, notxpcom] void GetData();
 };
 
--- a/widget/src/xpwidgets/GfxInfoBase.h
+++ b/widget/src/xpwidgets/GfxInfoBase.h
@@ -79,19 +79,16 @@ public:
   // Initialization function. If you override this, you must call this class's
   // version of Init first.
   // We need Init to be called separately from the constructor so we can
   // register as an observer after all derived classes have been constructed
   // and we know we have a non-zero refcount.
   // Ideally, Init() would be void-return, but the rules of
   // NS_GENERIC_FACTORY_CONSTRUCTOR_INIT require it be nsresult return.
   virtual nsresult Init();
-  
-  // only useful on X11
-  virtual void GetData() { }
 
 protected:
 
   virtual nsresult GetFeatureStatusImpl(PRInt32 aFeature, PRInt32* aStatus,
                                         nsAString& aSuggestedDriverVersion,
                                         GfxDriverInfo* aDriverInfo = nsnull) = 0;
 
 private:
--- a/widget/src/xpwidgets/GfxInfoX11.h
+++ b/widget/src/xpwidgets/GfxInfoX11.h
@@ -71,31 +71,30 @@ public:
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
   NS_SCRIPTABLE NS_IMETHOD GetIsGPU2Active(PRBool *aIsGPU2Active);
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;
 
   virtual nsresult Init();
-  
-  virtual void GetData();
 
 protected:
 
   virtual nsresult GetFeatureStatusImpl(PRInt32 aFeature, PRInt32 *aStatus, nsAString & aSuggestedDriverVersion, GfxDriverInfo* aDriverInfo = nsnull);
 
 private:
   nsCString mVendor;
   nsCString mRenderer;
   nsCString mVersion;
   nsCString mAdapterDescription;
   bool mIsMesa, mIsNVIDIA, mIsFGLRX;
   bool mHasTextureFromPixmap;
   int mMajorVersion, mMinorVersion, mRevisionVersion;
 
   void AddCrashReportAnnotations();
+  void GetData();
 };
 
 } // namespace widget
 } // namespace mozilla
 
 #endif /* __GfxInfoX11_h__ */
--- a/widget/src/xpwidgets/nsBaseWidget.cpp
+++ b/widget/src/xpwidgets/nsBaseWidget.cpp
@@ -822,24 +822,20 @@ nsBaseWidget::GetShouldAccelerate()
 
   nsCOMPtr<nsIXULRuntime> xr = do_GetService("@mozilla.org/xre/runtime;1");
   PRBool safeMode = PR_FALSE;
   if (xr)
     xr->GetInSafeMode(&safeMode);
 
   bool whitelisted = false;
 
+  // bug 655578: on X11 at least, we must always call GetFeatureStatus (even if we don't need that information)
+  // as that's what causes GfxInfo initialization which kills the zombie 'glxtest' process.
   nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
   if (gfxInfo) {
-    // bug 655578: on X11 at least, we must always call GetData (even if we don't need that information)
-    // as that's what causes GfxInfo initialization which kills the zombie 'glxtest' process.
-    // initially we relied on the fact that GetFeatureStatus calls GetData for us, but bug 681026 showed
-    // that assumption to be unsafe.
-    gfxInfo->GetData();
-
     PRInt32 status;
     if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &status))) {
       if (status == nsIGfxInfo::FEATURE_NO_INFO) {
         whitelisted = true;
       }
     }
   }