back out 8c075fee9be4 / Bug 704710 on suspiscion that it is what caused the blacklisting regression observed in bug 711656 and bug 715401 - a=akeybl RELEASE_BASE_20120308
authorBenoit Jacob <bjacob@mozilla.com>
Thu, 08 Mar 2012 18:06:46 -0500
changeset 85554 ff5f2055aba4b7bad4ee6584fd14ac35f0f1001a
parent 85553 9af0904f0486c84906eb0a2529404120b0fdc202
child 85555 ff0935d61662c03c01e5e543bd299782aa3ff46a
child 85557 7eaebc022f31c95003b7874c379f267c6c5cd6aa
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
reviewersakeybl
bugs704710, 711656, 715401
milestone11.0
backs out8c075fee9be499590b5ee1d4deac3d50c8deada0
back out 8c075fee9be4 / Bug 704710 on suspiscion that it is what caused the blacklisting regression observed in bug 711656 and bug 715401 - a=akeybl
toolkit/content/aboutSupport.js
widget/public/nsIGfxInfo.idl
widget/src/android/GfxInfo.cpp
widget/src/android/GfxInfo.h
widget/src/cocoa/GfxInfo.h
widget/src/cocoa/GfxInfo.mm
widget/src/windows/GfxInfo.cpp
widget/src/windows/GfxInfo.h
widget/src/xpwidgets/GfxDriverInfo.cpp
widget/src/xpwidgets/GfxDriverInfo.h
widget/src/xpwidgets/GfxInfoBase.cpp
widget/src/xpwidgets/GfxInfoX11.cpp
widget/src/xpwidgets/GfxInfoX11.h
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -244,27 +244,27 @@ function populateGraphicsSection() {
   try {
     // nsIGfxInfo is currently only implemented on Windows
     gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
   } catch(e) {}
 
   if (gfxInfo) {
     let trGraphics = [];
     pushInfoRow(trGraphics, "adapterDescription", gfxInfo.adapterDescription);
-    pushInfoRow(trGraphics, "adapterVendorID", gfxInfo.adapterVendorID);
-    pushInfoRow(trGraphics, "adapterDeviceID", gfxInfo.adapterDeviceID);
+    pushInfoRow(trGraphics, "adapterVendorID", hexValueToString(gfxInfo.adapterVendorID));
+    pushInfoRow(trGraphics, "adapterDeviceID", hexValueToString(gfxInfo.adapterDeviceID));
     pushInfoRow(trGraphics, "adapterRAM", gfxInfo.adapterRAM);
     pushInfoRow(trGraphics, "adapterDrivers", gfxInfo.adapterDriver);
     pushInfoRow(trGraphics, "driverVersion", gfxInfo.adapterDriverVersion);
     pushInfoRow(trGraphics, "driverDate", gfxInfo.adapterDriverDate);
 
 #ifdef XP_WIN
     pushInfoRow(trGraphics, "adapterDescription2", gfxInfo.adapterDescription2);
-    pushInfoRow(trGraphics, "adapterVendorID2", gfxInfo.adapterVendorID2);
-    pushInfoRow(trGraphics, "adapterDeviceID2", gfxInfo.adapterDeviceID2);
+    pushInfoRow(trGraphics, "adapterVendorID2", hexValueToString(gfxInfo.adapterVendorID2));
+    pushInfoRow(trGraphics, "adapterDeviceID2", hexValueToString(gfxInfo.adapterDeviceID2));
     pushInfoRow(trGraphics, "adapterRAM2", gfxInfo.adapterRAM2);
     pushInfoRow(trGraphics, "adapterDrivers2", gfxInfo.adapterDriver2);
     pushInfoRow(trGraphics, "driverVersion2", gfxInfo.adapterDriverVersion2);
     pushInfoRow(trGraphics, "driverDate2", gfxInfo.adapterDriverDate2);
     pushInfoRow(trGraphics, "isGPU2Active", gfxInfo.isGPU2Active);
 
     var version = Cc["@mozilla.org/system-info;1"]
                   .getService(Ci.nsIPropertyBag2)
--- a/widget/public/nsIGfxInfo.idl
+++ b/widget/public/nsIGfxInfo.idl
@@ -59,21 +59,21 @@ interface nsIGfxInfo : nsISupports
    */
   readonly attribute DOMString adapterDescription;
   readonly attribute DOMString adapterDescription2;
 
   readonly attribute DOMString adapterDriver;
   readonly attribute DOMString adapterDriver2;
   
   /* These types are inspired by DXGI_ADAPTER_DESC */
-  readonly attribute DOMString adapterVendorID;
-  readonly attribute DOMString adapterVendorID2;
+  readonly attribute unsigned long adapterVendorID;
+  readonly attribute unsigned long adapterVendorID2;
   
-  readonly attribute DOMString adapterDeviceID;
-  readonly attribute DOMString adapterDeviceID2;
+  readonly attribute unsigned long adapterDeviceID;
+  readonly attribute unsigned long adapterDeviceID2;
 
   /**
    * The amount of RAM in MB in the display adapter.
    */
   readonly attribute DOMString adapterRAM;
   readonly attribute DOMString adapterRAM2;
   
   readonly attribute DOMString adapterDriverVersion;
--- a/widget/src/android/GfxInfo.cpp
+++ b/widget/src/android/GfxInfo.cpp
@@ -183,96 +183,95 @@ GfxInfo::GetAdapterDriverDate(nsAString 
 
 /* readonly attribute DOMString adapterDriverDate2; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate)
 {
   return NS_ERROR_FAILURE;
 }
 
-/* readonly attribute DOMString adapterVendorID; */
+/* readonly attribute unsigned long adapterVendorID; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID)
+GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
 {
   nsAutoString str;
   PRInt32 version; // the HARDWARE field isn't available on Android SDK < 8
   if (!mozilla::AndroidBridge::Bridge()->GetStaticIntField("android/os/Build$VERSION", "SDK_INT", &version))
     version = 0;
   if (version >= 8 && mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "HARDWARE", str)) {
-    aAdapterVendorID = str;
+    *aAdapterVendorID = HashString(str);
     return NS_OK;
   }
 
-  aAdapterVendorID = NS_LITERAL_STRING("");
+  *aAdapterVendorID = 0;
   return NS_OK;
 }
 
-/* readonly attribute DOMString adapterVendorID2; */
+/* readonly attribute unsigned long adapterVendorID2; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID)
+GfxInfo::GetAdapterVendorID2(PRUint32 *aAdapterVendorID)
 {
   return NS_ERROR_FAILURE;
 }
 
-/* readonly attribute DOMString adapterDeviceID; */
+/* readonly attribute unsigned long adapterDeviceID; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID)
+GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
 {
   nsAutoString str;
   if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "MODEL", str)) {
-    aAdapterDeviceID = str;
+    *aAdapterDeviceID = HashString(str);
     return NS_OK;
   }
 
-  aAdapterDeviceID = NS_LITERAL_STRING("");
+  *aAdapterDeviceID = 0;
   return NS_OK;
 }
 
-/* readonly attribute DOMString adapterDeviceID2; */
+/* readonly attribute unsigned long adapterDeviceID2; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID)
+GfxInfo::GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID)
 {
   return NS_ERROR_FAILURE;
 }
 
 /* readonly attribute boolean isGPU2Active; */
 NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
 {
   return NS_ERROR_FAILURE;
 }
 
 void
 GfxInfo::AddOpenGLCrashReportAnnotations()
 {
 #if defined(MOZ_CRASHREPORTER)
-  nsAutoString adapterDescriptionString, deviceID, vendorID;
-  nsCAutoString narrowDeviceID, narrowVendorID;
+  nsCAutoString deviceIDString, vendorIDString;
+  nsAutoString adapterDescriptionString;
+  PRUint32 deviceID, vendorID;
 
-  GetAdapterDeviceID(deviceID);
-  GetAdapterVendorID(vendorID);
+  GetAdapterDeviceID(&deviceID);
+  GetAdapterVendorID(&vendorID);
   GetAdapterDescription(adapterDescriptionString);
 
-  narrowDeviceID = NS_ConvertUTF16toUTF8(deviceID);
-  narrowVendorID = NS_ConvertUTF16toUTF8(vendorID);
+  deviceIDString.AppendPrintf("%04x", deviceID);
+  vendorIDString.AppendPrintf("%04x", vendorID);
 
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterVendorID"),
-                                     narrowVendorID);
+      vendorIDString);
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDeviceID"),
-                                     narrowDeviceID);
+      deviceIDString);
 
   /* Add an App Note for now so that we get the data immediately. These
    * can go away after we store the above in the socorro db */
   nsCAutoString note;
   /* AppendPrintf only supports 32 character strings, mrghh. */
-  note.Append("AdapterVendorID: ");
-  note.Append(narrowVendorID);
-  note.Append(", AdapterDeviceID: ");
-  note.Append(narrowDeviceID);
-  note.Append(".\n");
+  note.AppendPrintf("AdapterVendorID: %04x, ", vendorID);
+  note.AppendPrintf("AdapterDeviceID: %04x.", deviceID);
+  note.Append("\n");
   note.AppendPrintf("AdapterDescription: '%s'.", NS_ConvertUTF16toUTF8(adapterDescriptionString).get());
   note.Append("\n");
 
   CrashReporter::AppendAppNotesToCrashReport(note);
 #endif
 }
 
 const nsTArray<GfxDriverInfo>&
--- a/widget/src/android/GfxInfo.h
+++ b/widget/src/android/GfxInfo.h
@@ -36,17 +36,16 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef __mozilla_widget_GfxInfo_h__
 #define __mozilla_widget_GfxInfo_h__
 
 #include "GfxInfoBase.h"
-#include "GfxDriverInfo.h"
 
 #include "nsString.h"
 
 namespace mozilla {
 namespace widget {
 
 class GfxInfo : public GfxInfoBase
 {
@@ -55,25 +54,25 @@ public:
   // rest is brought forward from GfxInfoBase.
   NS_SCRIPTABLE NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetAzureEnabled(bool *aAzureEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
   NS_SCRIPTABLE NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID(PRUint32 *aAdapterVendorID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID(PRUint32 *aAdapterDeviceID);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(PRUint32 *aAdapterVendorID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
   NS_SCRIPTABLE NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;
 
--- a/widget/src/cocoa/GfxInfo.h
+++ b/widget/src/cocoa/GfxInfo.h
@@ -56,25 +56,25 @@ public:
   // rest is brought forward from GfxInfoBase.
   NS_SCRIPTABLE NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetAzureEnabled(bool *aAzureEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
   NS_SCRIPTABLE NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID(PRUint32 *aAdapterVendorID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID(PRUint32 *aAdapterDeviceID);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(PRUint32 *aAdapterVendorID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
   NS_SCRIPTABLE NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;
 
@@ -96,18 +96,18 @@ private:
   nsString mRendererIDsString;
   nsString mAdapterRAMString;
 
   nsString mDeviceID;
   nsString mDriverVersion;
   nsString mDriverDate;
   nsString mDeviceKey;
 
-  nsString mAdapterVendorID;
-  nsString mAdapterDeviceID;
+  PRUint32 mAdapterVendorID;
+  PRUint32 mAdapterDeviceID;
 
   PRUint32 mRendererIDs[16];
 
   PRUint32 mOSXVersion;
 };
 
 } // namespace widget
 } // namespace mozilla
--- a/widget/src/cocoa/GfxInfo.mm
+++ b/widget/src/cocoa/GfxInfo.mm
@@ -63,16 +63,18 @@
 #define MAC_OS_X_VERSION_10_5_HEX   0x00001050
 #define MAC_OS_X_VERSION_10_6_HEX   0x00001060
 #define MAC_OS_X_VERSION_10_7_HEX   0x00001070
 
 using namespace mozilla;
 using namespace mozilla::widget;
 
 GfxInfo::GfxInfo()
+  : mAdapterVendorID(0),
+    mAdapterDeviceID(0)
 {
 }
 
 // The following three functions are derived from Chromium code
 static CFTypeRef SearchPortForProperty(io_registry_entry_t dspPort,
                                        CFStringRef propertyName)
 {
   return IORegistryEntrySearchCFProperty(dspPort,
@@ -97,35 +99,34 @@ static PRUint32 IntValueOfCFData(CFDataR
 }
 
 void
 GfxInfo::GetDeviceInfo()
 {
   io_registry_entry_t dsp_port = CGDisplayIOServicePort(kCGDirectMainDisplay);
   CFTypeRef vendor_id_ref = SearchPortForProperty(dsp_port, CFSTR("vendor-id"));
   if (vendor_id_ref) {
-    mAdapterVendorID.AppendPrintf("0x%4x", IntValueOfCFData((CFDataRef)vendor_id_ref));
+    mAdapterVendorID = IntValueOfCFData((CFDataRef)vendor_id_ref);
     CFRelease(vendor_id_ref);
   }
   CFTypeRef device_id_ref = SearchPortForProperty(dsp_port, CFSTR("device-id"));
   if (device_id_ref) {
-    mAdapterDeviceID.AppendPrintf("0x%4x", IntValueOfCFData((CFDataRef)device_id_ref));
+    mAdapterDeviceID = IntValueOfCFData((CFDataRef)device_id_ref);
     CFRelease(device_id_ref);
   }
 }
 
-// TODO dRdR FIXME
 static bool
-IsATIRadeonX1000(nsAString& aVendorID, nsAString& aDeviceID)
+IsATIRadeonX1000(PRUint32 aVendorID, PRUint32 aDeviceID)
 {
-  if (aVendorID.LowerCaseEqualsLiteral("0x1002")) {
+  if (aVendorID == 0x1002) {
     // this list is from the ATIRadeonX1000.kext Info.plist
-    const char * devices[] = {"0x7187", "0x7210", "0x71de", "0x7146", "0x7142", "0x7109", "0x71c5", "0x71c0", "0x7240", "0x7249", "0x7291"};
+    PRUint32 devices[] = {0x7187, 0x7210, 0x71DE, 0x7146, 0x7142, 0x7109, 0x71C5, 0x71C0, 0x7240, 0x7249, 0x7291};
     for (size_t i = 0; i < ArrayLength(devices); i++) {
-      if (aDeviceID.LowerCaseEqualsASCII(devices[i]))
+      if (aDeviceID == devices[i])
         return true;
     }
   }
   return false;
 }
 
 nsresult
 GfxInfo::Init()
@@ -286,93 +287,92 @@ GfxInfo::GetAdapterDriverDate(nsAString 
 
 /* readonly attribute DOMString adapterDriverDate2; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate)
 {
   return NS_ERROR_FAILURE;
 }
 
-/* readonly attribute DOMString adapterVendorID; */
+/* readonly attribute unsigned long adapterVendorID; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID)
+GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
 {
-  aAdapterVendorID = mAdapterVendorID;
+  *aAdapterVendorID = mAdapterVendorID;
   return NS_OK;
 }
 
-/* readonly attribute DOMString adapterVendorID2; */
+/* readonly attribute unsigned long adapterVendorID2; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID)
+GfxInfo::GetAdapterVendorID2(PRUint32 *aAdapterVendorID)
 {
   return NS_ERROR_FAILURE;
 }
 
-/* readonly attribute DOMString adapterDeviceID; */
+/* readonly attribute unsigned long adapterDeviceID; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID)
+GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
 {
-  aAdapterDeviceID = mAdapterDeviceID;
+  *aAdapterDeviceID = mAdapterDeviceID;
   return NS_OK;
 }
 
-/* readonly attribute DOMString adapterDeviceID2; */
+/* readonly attribute unsigned long adapterDeviceID2; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID)
+GfxInfo::GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID)
 {
   return NS_ERROR_FAILURE;
 }
 
 /* readonly attribute boolean isGPU2Active; */
 NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
 {
   return NS_ERROR_FAILURE;
 }
 
 void
 GfxInfo::AddCrashReportAnnotations()
 {
 #if defined(MOZ_CRASHREPORTER)
-  nsString deviceID, vendorID;
-  nsCAutoString narrowDeviceID, narrowVendorID;
+  nsCAutoString deviceIDString, vendorIDString;
+  PRUint32 deviceID, vendorID;
 
-  GetAdapterDeviceID(deviceID);
-  CopyUTF16toUTF8(deviceID, narrowDeviceID);
-  GetAdapterVendorID(vendorID);
-  CopyUTF16toUTF8(vendorID, narrowVendorID);
+  GetAdapterDeviceID(&deviceID);
+  GetAdapterVendorID(&vendorID);
+
+  deviceIDString.AppendPrintf("%04x", deviceID);
+  vendorIDString.AppendPrintf("%04x", vendorID);
 
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterVendorID"),
-                                     narrowVendorID);
+      vendorIDString);
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDeviceID"),
-                                     narrowDeviceID);
+      deviceIDString);
   /* Add an App Note for now so that we get the data immediately. These
    * can go away after we store the above in the socorro db */
   nsCAutoString note;
   /* AppendPrintf only supports 32 character strings, mrghh. */
-  note.Append("AdapterVendorID: ");
-  note.Append(narrowVendorID);
-  note.Append(", AdapterDeviceID: ");
-  note.Append(narrowDeviceID);
+  note.AppendPrintf("AdapterVendorID: %04x, ", vendorID);
+  note.AppendPrintf("AdapterDeviceID: %04x", deviceID);
   CrashReporter::AppendAppNotesToCrashReport(note);
 #endif
 }
 
 // We don't support checking driver versions on Mac.
 #define IMPLEMENT_MAC_DRIVER_BLOCKLIST(os, vendor, device, features, blockOn) \
   APPEND_TO_DRIVER_BLOCKLIST(os, vendor, device, features, blockOn,           \
                              DRIVER_UNKNOWN_COMPARISON, V(0,0,0,0), "")
 
 
 const nsTArray<GfxDriverInfo>&
 GfxInfo::GetGfxDriverInfo()
 {
   if (!mDriverInfo->Length()) {
     IMPLEMENT_MAC_DRIVER_BLOCKLIST(DRIVER_OS_ALL,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorATI, GfxDriverInfo::allDevices,
       nsIGfxInfo::FEATURE_WEBGL_MSAA, nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION);
   }
   return *mDriverInfo;
 }
 
 static OperatingSystem
 OSXVersionToOperatingSystem(PRUint32 aOSXVersion)
 {
@@ -459,31 +459,29 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
       status = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
   }
 
   if (aFeature == nsIGfxInfo::FEATURE_WEBGL_OPENGL) {
     // same comment as above for FEATURE_OPENGL_LAYERS.
     bool foundGoodDevice = true;
 
     // Blacklist the Geforce 7300 GT because of bug 678053
-    if (mAdapterVendorID.LowerCaseEqualsLiteral("0x10de") &&
-        mAdapterDeviceID.LowerCaseEqualsLiteral("0x0393")) {
+    if (mAdapterVendorID == 0x10de && mAdapterDeviceID == 0x0393) {
       foundGoodDevice = false;
     }
 
     if (!foundGoodDevice)
       status = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
   }
 
   if (aFeature == nsIGfxInfo::FEATURE_WEBGL_MSAA) {
     // Blacklist all ATI cards on OSX, except for
     // 0x6760 and 0x9488
-    if (mAdapterVendorID == GfxDriverInfo::GetDeviceVendor(VendorATI) && 
-        (mAdapterDeviceID.LowerCaseEqualsLiteral("0x6760") ||
-         mAdapterDeviceID.LowerCaseEqualsLiteral("0x9488"))) {
+    if (mAdapterVendorID == GfxDriverInfo::vendorATI && 
+          (mAdapterDeviceID == 0x6760 || mAdapterDeviceID == 0x9488)) {
       *aStatus = nsIGfxInfo::FEATURE_NO_INFO;
       return NS_OK;
     }
   }
 
   if (aOS)
     *aOS = os;
   *aStatus = status;
--- a/widget/src/windows/GfxInfo.cpp
+++ b/widget/src/windows/GfxInfo.cpp
@@ -44,17 +44,16 @@
 #include "GfxInfo.h"
 #include "GfxInfoWebGL.h"
 #include "nsUnicharUtils.h"
 #include "mozilla/FunctionTimer.h"
 #include "prenv.h"
 #include "prprf.h"
 #include "GfxDriverInfo.h"
 #include "mozilla/Preferences.h"
-#include "nsPrintfCString.h"
 
 #if defined(MOZ_CRASHREPORTER)
 #include "nsExceptionHandler.h"
 #include "nsICrashReporter.h"
 #define NS_CRASHREPORTER_CONTRACTID "@mozilla.org/toolkit/crash-reporter;1"
 #endif
 
 using namespace mozilla;
@@ -65,17 +64,21 @@ NS_IMPL_ISUPPORTS_INHERITED1(GfxInfo, Gf
 #endif
 
 static const PRUint32 allWindowsVersions = 0xffffffff;
 
 #define V(a,b,c,d) GFX_DRIVER_VERSION(a,b,c,d)
 
 
 GfxInfo::GfxInfo()
- :  mWindowsVersion(0),
+  : mAdapterVendorID(0),
+    mAdapterDeviceID(0),
+    mAdapterVendorID2(0),
+    mAdapterDeviceID2(0),
+    mWindowsVersion(0),
     mHasDualGPU(false),
     mIsGPU2Active(false)
 {
 }
 
 /* GetD2DEnabled and GetDwriteEnabled shouldn't be called until after gfxPlatform initialization
  * has occurred because they depend on it for information. (See bug 591561) */
 nsresult
@@ -420,18 +423,18 @@ GfxInfo::Init()
               break;
             }
           }
         }
 
         setupDestroyDeviceInfoList(devinfo);
       }
 
-      mAdapterVendorID.AppendPrintf("0x%04x", ParseIDFromDeviceID(mDeviceID, "VEN_", 4));
-      mAdapterDeviceID.AppendPrintf("0x%04x", ParseIDFromDeviceID(mDeviceID, "&DEV_", 4));
+      mAdapterVendorID  = ParseIDFromDeviceID(mDeviceID,  "VEN_", 4);
+      mAdapterDeviceID  = ParseIDFromDeviceID(mDeviceID,  "&DEV_", 4);
       mAdapterSubsysID  = ParseIDFromDeviceID(mDeviceID,  "&SUBSYS_", 8);
 
       // We now check for second display adapter.
 
       // Device interface class for display adapters.
       CLSID GUID_DISPLAY_DEVICE_ARRIVAL;
       HRESULT hresult = CLSIDFromString(L"{1CA05180-A699-450A-9A0C-DE4FBE3DDD89}",
                                    &GUID_DISPLAY_DEVICE_ARRIVAL);
@@ -471,24 +474,20 @@ GfxInfo::Init()
               result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, driverKey2.BeginReading(), 0, KEY_QUERY_VALUE, &key);
               if (result == ERROR_SUCCESS) {
                 dwcbData = sizeof(value);
                 result = RegQueryValueExW(key, L"MatchingDeviceId", NULL, NULL, (LPBYTE)value, &dwcbData);
                 if (result != ERROR_SUCCESS) {
                   continue;
                 }
                 deviceID2 = value;
-                nsAutoString adapterVendorID2String;
-                nsAutoString adapterDeviceID2String;
                 adapterVendorID2 = ParseIDFromDeviceID(deviceID2, "VEN_", 4);
-                adapterVendorID2String.AppendPrintf("0x%04x", adapterVendorID2);
                 adapterDeviceID2 = ParseIDFromDeviceID(deviceID2, "&DEV_", 4);
-                adapterDeviceID2String.AppendPrintf("0x%04x", adapterDeviceID2);
-                if (mAdapterVendorID == adapterVendorID2String &&
-                    mAdapterDeviceID == adapterDeviceID2String) {
+                if ((adapterVendorID2 == mAdapterVendorID) &&
+                    (adapterDeviceID2 == mAdapterDeviceID)) {
                   RegCloseKey(key);
                   continue;
                 }
 
                 // If this device is missing driver information, it is unlikely to
                 // be a real display adapter.
                 if (NS_FAILED(GetKeyValue(driverKey2.BeginReading(), L"InstalledDisplayDrivers",
                                adapterDriver2, REG_MULTI_SZ))) {
@@ -518,18 +517,18 @@ GfxInfo::Init()
                 RegCloseKey(key);
                 if (result == ERROR_SUCCESS) {
                   mHasDualGPU = true;
                   mDeviceString2 = value;
                   mDeviceID2 = deviceID2;
                   mDeviceKey2 = driverKey2;
                   mDriverVersion2 = driverVersion2;
                   mDriverDate2 = driverDate2;
-                  mAdapterVendorID2.AppendPrintf("0x%04x", adapterVendorID2);
-                  mAdapterDeviceID2.AppendPrintf("0x%04x", adapterDeviceID2);
+                  mAdapterVendorID2 = adapterVendorID2;
+                  mAdapterDeviceID2 = adapterDeviceID2;
                   mAdapterSubsysID2 = ParseIDFromDeviceID(mDeviceID2, "&SUBSYS_", 8);
                   break;
                 }
               }
             }
           }
 
           setupDestroyDeviceInfoList(devinfo);
@@ -544,21 +543,21 @@ GfxInfo::Init()
 
   const char *spoofedDriverVersionString = PR_GetEnv("MOZ_GFX_SPOOF_DRIVER_VERSION");
   if (spoofedDriverVersionString) {
     mDriverVersion.AssignASCII(spoofedDriverVersionString);
   }
 
   const char *spoofedVendor = PR_GetEnv("MOZ_GFX_SPOOF_VENDOR_ID");
   if (spoofedVendor) {
-    mAdapterVendorID.AssignASCII(spoofedVendor);
+     PR_sscanf(spoofedVendor, "%x", &mAdapterVendorID);
   }
 
   mHasDriverVersionMismatch = false;
-  if (mAdapterVendorID == GfxDriverInfo::GetDeviceVendor(VendorIntel)) {
+  if (mAdapterVendorID == GfxDriverInfo::vendorIntel) {
     // we've had big crashers (bugs 590373 and 595364) apparently correlated
     // with bad Intel driver installations where the DriverVersion reported
     // by the registry was not the version of the DLL.
     bool is64bitApp = sizeof(void*) == 8;
     const PRUnichar *dllFileName = is64bitApp
                                  ? L"igd10umd64.dll"
                                  : L"igd10umd32.dll";
     nsString dllVersion;
@@ -572,17 +571,17 @@ GfxInfo::Init()
     // so if GetDLLVersion failed, we get dllNumericVersion = 0
     // so this test implicitly handles the case where GetDLLVersion failed
     if (dllNumericVersion != driverNumericVersion)
       mHasDriverVersionMismatch = true;
   }
 
   const char *spoofedDevice = PR_GetEnv("MOZ_GFX_SPOOF_DEVICE_ID");
   if (spoofedDevice) {
-    mAdapterDeviceID.AssignASCII(spoofedDevice);
+    PR_sscanf(spoofedDevice, "%x", &mAdapterDeviceID);
   }
 
   const char *spoofedWindowsVersion = PR_GetEnv("MOZ_GFX_SPOOF_WINDOWS_VERSION");
   if (spoofedWindowsVersion) {
     PR_sscanf(spoofedWindowsVersion, "%x", &mWindowsVersion);
   } else {
     mWindowsVersion = gfxWindowsPlatform::WindowsOSVersion();
   }
@@ -677,45 +676,45 @@ GfxInfo::GetAdapterDriverVersion2(nsAStr
 /* readonly attribute DOMString adapterDriverDate2; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate)
 {
   aAdapterDriverDate = mDriverDate2;
   return NS_OK;
 }
 
-/* readonly attribute DOMString adapterVendorID; */
+/* readonly attribute unsigned long adapterVendorID; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID)
+GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
 {
-  aAdapterVendorID = mAdapterVendorID;
+  *aAdapterVendorID = mAdapterVendorID;
   return NS_OK;
 }
 
-/* readonly attribute DOMString adapterVendorID2; */
+/* readonly attribute unsigned long adapterVendorID2; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID)
+GfxInfo::GetAdapterVendorID2(PRUint32 *aAdapterVendorID)
 {
-  aAdapterVendorID = mAdapterVendorID2;
+  *aAdapterVendorID = mAdapterVendorID2;
   return NS_OK;
 }
 
-/* readonly attribute DOMString adapterDeviceID; */
+/* readonly attribute unsigned long adapterDeviceID; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID)
+GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
 {
-  aAdapterDeviceID = mAdapterDeviceID;
+  *aAdapterDeviceID = mAdapterDeviceID;
   return NS_OK;
 }
 
-/* readonly attribute DOMString adapterDeviceID2; */
+/* readonly attribute unsigned long adapterDeviceID2; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID)
+GfxInfo::GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID)
 {
-  aAdapterDeviceID = mAdapterDeviceID2;
+  *aAdapterDeviceID = mAdapterDeviceID2;
   return NS_OK;
 }
 
 /* readonly attribute boolean isGPU2Active; */
 NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
 {
   *aIsGPU2Active = mIsGPU2Active;
@@ -740,69 +739,62 @@ CheckForCiscoVPN() {
 #endif
 
 void
 GfxInfo::AddCrashReportAnnotations()
 {
 #if defined(MOZ_CRASHREPORTER)
   CheckForCiscoVPN();
 
-  nsString deviceID, vendorID;
-  nsCString narrowDeviceID, narrowVendorID;
+  nsCAutoString deviceIDString, vendorIDString;
+  PRUint32 deviceID, vendorID;
   nsAutoString adapterDriverVersionString;
 
-  GetAdapterDeviceID(deviceID);
-  CopyUTF16toUTF8(deviceID, narrowDeviceID);
-  GetAdapterVendorID(vendorID);
-  CopyUTF16toUTF8(vendorID, narrowVendorID);
+  GetAdapterDeviceID(&deviceID);
+  GetAdapterVendorID(&vendorID);
   GetAdapterDriverVersion(adapterDriverVersionString);
 
+  deviceIDString.AppendPrintf("%04x", deviceID);
+  vendorIDString.AppendPrintf("%04x", vendorID);
+
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterVendorID"),
-                                     narrowVendorID);
+      vendorIDString);
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDeviceID"),
-                                     narrowDeviceID);
+      deviceIDString);
   
   /* Add an App Note for now so that we get the data immediately. These
    * can go away after we store the above in the socorro db */
   nsCAutoString note;
   /* AppendPrintf only supports 32 character strings, mrghh. */
-  note.Append("AdapterVendorID: ");
-  note.Append(narrowVendorID);
-  note.Append(", AdapterDeviceID: ");
-  note.Append(narrowDeviceID);
-  note.AppendPrintf(", AdapterSubsysID: %08x, ", mAdapterSubsysID);
-  note.Append("AdapterDriverVersion: ");
+  note.AppendPrintf("AdapterVendorID: %04x, ", vendorID);
+  note.AppendPrintf("AdapterDeviceID: %04x, ", deviceID);
+  note.AppendPrintf("AdapterSubsysID: %08x, ", mAdapterSubsysID);
+  note.AppendPrintf("AdapterDriverVersion: ");
   note.Append(NS_LossyConvertUTF16toASCII(adapterDriverVersionString));
 
-  if (vendorID == GfxDriverInfo::GetDeviceVendor(VendorAll)) {
-    /* if we didn't find a valid vendorID lets append the mDeviceID string to try to find out why */
-    note.Append(", ");
-    note.AppendWithConversion(mDeviceID);
-    note.Append(", ");
-    note.AppendWithConversion(mDeviceKeyDebug);
-    LossyAppendUTF16toASCII(mDeviceKeyDebug, note);
+  if (vendorID == 0) {
+      /* if we didn't find a valid vendorID lets append the mDeviceID string to try to find out why */
+      note.AppendLiteral(", ");
+      LossyAppendUTF16toASCII(mDeviceID, note);
+      note.AppendLiteral(", ");
+      LossyAppendUTF16toASCII(mDeviceKeyDebug, note);
   }
   note.Append("\n");
 
   if (mHasDualGPU) {
-    nsString deviceID2, vendorID2;
+    PRUint32 deviceID2, vendorID2;
     nsAutoString adapterDriverVersionString2;
-    nsCString narrowDeviceID2, narrowVendorID2;
 
     note.AppendLiteral("Has dual GPUs. GPU #2: ");
-    GetAdapterDeviceID2(deviceID2);
-    CopyUTF16toUTF8(deviceID2, narrowDeviceID2);
-    GetAdapterVendorID2(vendorID2);
-    CopyUTF16toUTF8(vendorID2, narrowVendorID2);
+    GetAdapterDeviceID2(&deviceID2);
+    GetAdapterVendorID2(&vendorID2);
     GetAdapterDriverVersion2(adapterDriverVersionString2);
-    note.Append("AdapterVendorID2: ");
-    note.Append(narrowVendorID2);
-    note.Append(", AdapterDeviceID2: ");
-    note.Append(narrowDeviceID2);
-    note.AppendPrintf(", AdapterSubsysID2: %08x, ", mAdapterSubsysID2);
+    note.AppendPrintf("AdapterVendorID2: %04x, ", vendorID2);
+    note.AppendPrintf("AdapterDeviceID2: %04x, ", deviceID2);
+    note.AppendPrintf("AdapterSubsysID2: %08x, ", mAdapterSubsysID2);
     note.AppendPrintf("AdapterDriverVersion2: ");
     note.Append(NS_LossyConvertUTF16toASCII(adapterDriverVersionString2));
   }
   CrashReporter::AppendAppNotesToCrashReport(note);
 
 #endif
 }
 
@@ -825,171 +817,171 @@ WindowsVersionToOperatingSystem(PRInt32 
       return DRIVER_OS_UNKNOWN;
     };
 }
 
 const nsTArray<GfxDriverInfo>&
 GfxInfo::GetGfxDriverInfo()
 {
   if (!mDriverInfo->Length()) {
-    /*
+     /*
      * NVIDIA entries
      */
     APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_WINDOWS_XP,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorNVIDIA, GfxDriverInfo::allDevices,
       GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
       DRIVER_LESS_THAN, V(6,14,12,5721), "257.21" );
     APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_WINDOWS_VISTA,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorNVIDIA, GfxDriverInfo::allDevices,
       GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
       DRIVER_LESS_THAN, V(8,17,12,5721), "257.21" );
     APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_WINDOWS_7,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorNVIDIA, GfxDriverInfo::allDevices,
       GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
       DRIVER_LESS_THAN, V(8,17,12,5721), "257.21" );
 
+    /* Disable D3D9 layers on NVIDIA 6100/6150/6200 series due to glitches
+     * whilst scrolling. See bugs: 612007, 644787 & 645872.
+     */
+    APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL,
+      GfxDriverInfo::vendorNVIDIA, (GfxDeviceFamily) GfxDriverInfo::GetDeviceFamily(DeviceFamily::NvidiaBlockD3D9Layers),
+      nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
+      DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions );
+
     /*
      * AMD/ATI entries
      */
     APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_ALL,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorATI, GfxDriverInfo::allDevices,
       GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
       DRIVER_LESS_THAN, V(8,741,0,0), "10.6" );
     APPEND_TO_DRIVER_BLOCKLIST( DRIVER_OS_ALL,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAMD), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorAMD, GfxDriverInfo::allDevices,
       GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
       DRIVER_LESS_THAN, V(8,741,0,0), "10.6" );
 
     /* OpenGL on any ATI/AMD hardware is discouraged
      * See:
      *  bug 619773 - WebGL: Crash with blue screen : "NMI: Parity Check / Memory Parity Error"
      *  bugs 584403, 584404, 620924 - crashes in atioglxx
      *  + many complaints about incorrect rendering
      */
     APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorATI, GfxDriverInfo::allDevices,
       nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_DISCOURAGED,
       DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions );
     APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorATI, GfxDriverInfo::allDevices,
       nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED,
       DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions );
     APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAMD), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorAMD, GfxDriverInfo::allDevices,
       nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_DISCOURAGED,
       DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions );
     APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAMD), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorAMD, GfxDriverInfo::allDevices,
       nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED,
       DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions );
 
     /*
      * Intel entries
      */
 
     /* implement the blocklist from bug 594877
      * Block all features on any drivers before this, as there's a crash when a MS Hotfix is installed.
      * The crash itself is Direct2D-related, but for safety we block all features.
      */
-    #define IMPLEMENT_INTEL_DRIVER_BLOCKLIST(winVer, devFamily, driverVer)                                                      \
-      APPEND_TO_DRIVER_BLOCKLIST2( winVer,                                                                                      \
-        (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(devFamily), \
-        GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,                                                 \
+    #define IMPLEMENT_INTEL_DRIVER_BLOCKLIST(winVer, devFamily, driverVer) \
+      APPEND_TO_DRIVER_BLOCKLIST2( winVer,                                               \
+        GfxDriverInfo::vendorIntel, (GfxDeviceFamily) GfxDriverInfo::GetDeviceFamily(devFamily),    \
+        GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,                     \
         DRIVER_LESS_THAN, driverVer )
 
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA500,   V(6,14,11,1018));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA900,   V(6,14,10,4764));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA950,   V(6,14,10,4926));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMA3150,  V(6,14,10,5260));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMAX3000, V(6,14,10,5218));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, IntelGMAX4500HD, V(6,14,10,5284));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, DeviceFamily::IntelGMA500,   V(6,14,11,1018));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, DeviceFamily::IntelGMA900,   V(6,14,10,4764));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, DeviceFamily::IntelGMA950,   V(6,14,10,4926));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, DeviceFamily::IntelGMA3150,  V(6,14,10,5260));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, DeviceFamily::IntelGMAX3000, V(6,14,10,5218));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_XP, DeviceFamily::IntelGMAX4500HD, V(6,14,10,5284));
 
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA500,   V(7,14,10,1006));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA900,   GfxDriverInfo::allDriverVersions);
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA950,   V(7,14,10,1504));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMA3150,  V(7,14,10,2124));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMAX3000, V(7,15,10,1666));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, IntelGMAX4500HD, V(8,15,10,2202));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, DeviceFamily::IntelGMA500,   V(7,14,10,1006));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, DeviceFamily::IntelGMA900,   GfxDriverInfo::allDriverVersions);
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, DeviceFamily::IntelGMA950,   V(7,14,10,1504));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, DeviceFamily::IntelGMA3150,  V(7,14,10,2124));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, DeviceFamily::IntelGMAX3000, V(7,15,10,1666));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_VISTA, DeviceFamily::IntelGMAX4500HD, V(8,15,10,2202));
 
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA500,   V(5,0,0,2026));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA900,   GfxDriverInfo::allDriverVersions);
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA950,   V(8,15,10,1930));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMA3150,  V(8,14,10,2117));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMAX3000, V(8,15,10,1930));
-    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, IntelGMAX4500HD, V(8,15,10,2202));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, DeviceFamily::IntelGMA500,   V(5,0,0,2026));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, DeviceFamily::IntelGMA900,   GfxDriverInfo::allDriverVersions);
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, DeviceFamily::IntelGMA950,   V(8,15,10,1930));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, DeviceFamily::IntelGMA3150,  V(8,14,10,2117));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, DeviceFamily::IntelGMAX3000, V(8,15,10,1930));
+    IMPLEMENT_INTEL_DRIVER_BLOCKLIST(DRIVER_OS_WINDOWS_7, DeviceFamily::IntelGMAX4500HD, V(8,15,10,2202));
 
-    /* OpenGL on any Intel hardware is discouraged */
+     /* OpenGL on any Intel hardware is discouraged */
     APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorIntel, GfxDriverInfo::allDevices,
       nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_DISCOURAGED,
       DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions );
     APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), GfxDriverInfo::allDevices,
+      GfxDriverInfo::vendorIntel, GfxDriverInfo::allDevices,
       nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED,
       DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions );
-
-    /* Disable D3D9 layers on NVIDIA 6100/6150/6200 series due to glitches
-     * whilst scrolling. See bugs: 612007, 644787 & 645872.
-     */
-    APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL,
-      (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(NvidiaBlockD3D9Layers),
-      nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
-      DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions );
   }
   return *mDriverInfo;
 }
 
 nsresult
-GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature,
+GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, 
                               PRInt32 *aStatus, 
                               nsAString & aSuggestedDriverVersion, 
                               const nsTArray<GfxDriverInfo>& aDriverInfo,
                               OperatingSystem* aOS /* = nsnull */)
 {
   aSuggestedDriverVersion.SetIsVoid(true);
 
   PRInt32 status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
 
-  nsAutoString adapterVendorID;
-  nsAutoString adapterDeviceID;
+  PRUint32 adapterVendorID = 0;
+  PRUint32 adapterDeviceID = 0;
   nsAutoString adapterDriverVersionString;
-  if (NS_FAILED(GetAdapterVendorID(adapterVendorID)) ||
-      NS_FAILED(GetAdapterDeviceID(adapterDeviceID)) ||
+  if (NS_FAILED(GetAdapterVendorID(&adapterVendorID)) ||
+      NS_FAILED(GetAdapterDeviceID(&adapterDeviceID)) ||
       NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString)))
   {
     return NS_ERROR_FAILURE;
   }
 
-  if (adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorIntel) &&
-      adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorNVIDIA) &&
-      adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorAMD) &&
-      adapterVendorID != GfxDriverInfo::GetDeviceVendor(VendorATI) &&
+  if (adapterVendorID != GfxDriverInfo::vendorIntel &&
+      adapterVendorID != GfxDriverInfo::vendorNVIDIA &&
+      adapterVendorID != GfxDriverInfo::vendorAMD &&
+      adapterVendorID != GfxDriverInfo::vendorATI &&
       // FIXME - these special hex values are currently used in xpcshell tests introduced by
       // bug 625160 patch 8/8. Maybe these tests need to be adjusted now that we're only whitelisting
       // intel/ati/nvidia.
-      !adapterVendorID.LowerCaseEqualsLiteral("0xabcd") &&
-      !adapterVendorID.LowerCaseEqualsLiteral("0xdcba") &&
-      !adapterVendorID.LowerCaseEqualsLiteral("0xabab") &&
-      !adapterVendorID.LowerCaseEqualsLiteral("0xdcdc"))
+      adapterVendorID != 0xabcd &&
+      adapterVendorID != 0xdcba &&
+      adapterVendorID != 0xabab &&
+      adapterVendorID != 0xdcdc)
   {
     *aStatus = FEATURE_BLOCKED_DEVICE;
     return NS_OK;
   }
 
   PRUint64 driverVersion;
   if (!ParseDriverVersion(adapterDriverVersionString, &driverVersion)) {
     return NS_ERROR_FAILURE;
   }
 
   // special-case the WinXP test slaves: they have out-of-date drivers, but we still want to
   // whitelist them, actually we do know that this combination of device and driver version
   // works well.
   if (mWindowsVersion == gfxWindowsPlatform::kWindowsXP &&
-      adapterVendorID == GfxDriverInfo::GetDeviceVendor(VendorNVIDIA) &&
-      adapterDeviceID.LowerCaseEqualsLiteral("0x0861") && // GeForce 9400
+      adapterVendorID == GfxDriverInfo::vendorNVIDIA &&
+      adapterDeviceID == 0x0861 && // GeForce 9400
       driverVersion == V(6,14,11,7756))
   {
     *aStatus = FEATURE_NO_INFO;
     return NS_OK;
   }
 
   if (aFeature == FEATURE_DIRECT3D_9_LAYERS &&
       mWindowsVersion < gfxWindowsPlatform::kWindowsXP)
@@ -1033,26 +1025,24 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
 
 #ifdef DEBUG
 
 // Implement nsIGfxInfoDebug
 
 /* void spoofVendorID (in unsigned long aVendorID); */
 NS_IMETHODIMP GfxInfo::SpoofVendorID(PRUint32 aVendorID)
 {
-  mAdapterVendorID.Truncate(0);
-  mAdapterVendorID.AppendPrintf("0x%04x", aVendorID);
+  mAdapterVendorID = aVendorID;
   return NS_OK;
 }
 
 /* void spoofDeviceID (in unsigned long aDeviceID); */
 NS_IMETHODIMP GfxInfo::SpoofDeviceID(PRUint32 aDeviceID)
 {
-  mAdapterDeviceID.Truncate(0);
-  mAdapterDeviceID.AppendPrintf("0x%04x", aDeviceID);
+  mAdapterDeviceID = aDeviceID;
   return NS_OK;
 }
 
 /* void spoofDriverVersion (in DOMString aDriverVersion); */
 NS_IMETHODIMP GfxInfo::SpoofDriverVersion(const nsAString & aDriverVersion)
 {
   mDriverVersion = aDriverVersion;
   return NS_OK;
--- a/widget/src/windows/GfxInfo.h
+++ b/widget/src/windows/GfxInfo.h
@@ -58,25 +58,25 @@ public:
   // rest is brought forward from GfxInfoBase.
   NS_SCRIPTABLE NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetAzureEnabled(bool *aAzureEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
   NS_SCRIPTABLE NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID(PRUint32 *aAdapterVendorID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID(PRUint32 *aAdapterDeviceID);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(PRUint32 *aAdapterVendorID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
   NS_SCRIPTABLE NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;
 
@@ -100,26 +100,26 @@ private:
 
   void AddCrashReportAnnotations();
   nsString mDeviceString;
   nsString mDeviceID;
   nsString mDriverVersion;
   nsString mDriverDate;
   nsString mDeviceKey;
   nsString mDeviceKeyDebug;
-  nsString mAdapterVendorID;
-  nsString mAdapterDeviceID;
+  PRUint32 mAdapterVendorID;
+  PRUint32 mAdapterDeviceID;
   PRUint32 mAdapterSubsysID;
   nsString mDeviceString2;
   nsString mDriverVersion2;
   nsString mDeviceID2;
   nsString mDriverDate2;
   nsString mDeviceKey2;
-  nsString mAdapterVendorID2;
-  nsString mAdapterDeviceID2;
+  PRUint32 mAdapterVendorID2;
+  PRUint32 mAdapterDeviceID2;
   PRUint32 mAdapterSubsysID2;
   PRUint32 mWindowsVersion;
   bool mHasDualGPU;
   bool mIsGPU2Active;
   bool mHasDriverVersionMismatch;
 };
 
 } // namespace widget
--- a/widget/src/xpwidgets/GfxDriverInfo.cpp
+++ b/widget/src/xpwidgets/GfxDriverInfo.cpp
@@ -35,38 +35,42 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "GfxDriverInfo.h"
 #include "nsIGfxInfo.h"
 
 using namespace mozilla::widget;
 
+PRUint32 GfxDriverInfo::allAdapterVendors = 0;
 PRInt32 GfxDriverInfo::allFeatures = 0;
 PRUint64 GfxDriverInfo::allDriverVersions = ~(PRUint64(0));
-GfxDeviceFamily* const GfxDriverInfo::allDevices = nsnull;
 
-GfxDeviceFamily* GfxDriverInfo::mDeviceFamilies[DeviceFamilyMax];
-nsAString* GfxDriverInfo::mDeviceVendors[DeviceVendorMax];
+PRUint32 GfxDriverInfo::vendorIntel = 0x8086;
+PRUint32 GfxDriverInfo::vendorNVIDIA = 0x10de;
+PRUint32 GfxDriverInfo::vendorAMD = 0x1022;
+PRUint32 GfxDriverInfo::vendorATI = 0x1002;
+
+GfxDeviceFamily GfxDriverInfo::allDevices = nsnull;
 
 GfxDriverInfo::GfxDriverInfo()
   : mOperatingSystem(DRIVER_OS_UNKNOWN),
-    mAdapterVendor(GfxDriverInfo::GetDeviceVendor(VendorAll)),
+    mAdapterVendor(allAdapterVendors),
     mDevices(allDevices),
     mDeleteDevices(false),
     mFeature(allFeatures),
     mFeatureStatus(nsIGfxInfo::FEATURE_NO_INFO),
     mComparisonOp(DRIVER_UNKNOWN_COMPARISON),
     mDriverVersion(0),
     mDriverVersionMax(0),
     mSuggestedVersion(nsnull)
 {}
 
-GfxDriverInfo::GfxDriverInfo(OperatingSystem os, nsAString& vendor,
-                             GfxDeviceFamily* devices,
+GfxDriverInfo::GfxDriverInfo(OperatingSystem os, PRUint32 vendor,
+                             GfxDeviceFamily devices,
                              PRInt32 feature, PRInt32 featureStatus,
                              VersionComparisonOp op,
                              PRUint64 driverVersion,
                              const char *suggestedVersion /* = nsnull */,
                              bool ownDevices /* = false */)
   : mOperatingSystem(os),
     mAdapterVendor(vendor),
     mDevices(devices),
@@ -84,170 +88,160 @@ GfxDriverInfo::GfxDriverInfo(const GfxDr
     mAdapterVendor(aOrig.mAdapterVendor),
     mFeature(aOrig.mFeature),
     mFeatureStatus(aOrig.mFeatureStatus),
     mComparisonOp(aOrig.mComparisonOp),
     mDriverVersion(aOrig.mDriverVersion),
     mDriverVersionMax(aOrig.mDriverVersionMax),
     mSuggestedVersion(aOrig.mSuggestedVersion)
 {
-  // If we're managing the lifetime of the device family, we have to make a
-  // copy of the original's device family.
-  if (aOrig.mDeleteDevices && aOrig.mDevices) {
-    mDevices = new GfxDeviceFamily;
-    *mDevices = *aOrig.mDevices;
+  // If we're managing the lifetime of the devices array, we have to make a
+  // copy of the original's array.
+  if (aOrig.mDeleteDevices) {
+    PRUint32 count = 0;
+    const PRUint32 *device = aOrig.mDevices;
+    while (*device) {
+      count++;
+      device++;
+    }
+
+    mDevices = new PRUint32[count + 1];
+    memcpy(mDevices, aOrig.mDevices, sizeof(PRUint32) * (count + 1));
   } else {
     mDevices = aOrig.mDevices;
   }
 
   mDeleteDevices = aOrig.mDeleteDevices;
 }
 
 GfxDriverInfo::~GfxDriverInfo()
 {
   if (mDeleteDevices)
-    delete mDevices;
+    delete[] mDevices;
 }
 
-// Macros for appending a device to the DeviceFamily.
-#define APPEND_DEVICE(device) APPEND_DEVICE2(#device)
-#define APPEND_DEVICE2(device) deviceFamily->AppendElement(NS_LITERAL_STRING(device))
-
-const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id)
+const GfxDeviceFamily GfxDriverInfo::GetDeviceFamily(DeviceFamily id)
 {
-  // The code here is too sensitive to fall through to the default case if the
-  // code is invalid.
-  NS_ASSERTION(id >= 0 && id < DeviceFamilyMax, "DeviceFamily id is out of range");
-
-  // If it already exists, we must have processed it once, so return it now.
-  if (mDeviceFamilies[id])
-    return mDeviceFamilies[id];
-
-  mDeviceFamilies[id] = new GfxDeviceFamily;
-  GfxDeviceFamily* deviceFamily = mDeviceFamilies[id];
-
   switch (id) {
-    case IntelGMA500:
-      APPEND_DEVICE(0x8108); /* IntelGMA500_1 */
-      APPEND_DEVICE(0x8109); /* IntelGMA500_2 */
-      break;
-    case IntelGMA900:
-      APPEND_DEVICE(0x2582); /* IntelGMA900_1 */
-      APPEND_DEVICE(0x2782); /* IntelGMA900_2 */
-      APPEND_DEVICE(0x2592); /* IntelGMA900_3 */
-      APPEND_DEVICE(0x2792); /* IntelGMA900_4 */
-      break;
-    case IntelGMA950:
-      APPEND_DEVICE(0x2772); /* Intel945G_1 */
-      APPEND_DEVICE(0x2776); /* Intel945G_2 */
-      APPEND_DEVICE(0x27a2); /* Intel945_1 */
-      APPEND_DEVICE(0x27a6); /* Intel945_2 */
-      APPEND_DEVICE(0x27ae); /* Intel945_3 */
-      break;
-    case IntelGMA3150:
-      APPEND_DEVICE(0xa001); /* IntelGMA3150_Nettop_1 */
-      APPEND_DEVICE(0xa002); /* IntelGMA3150_Nettop_2 */
-      APPEND_DEVICE(0xa011); /* IntelGMA3150_Netbook_1 */
-      APPEND_DEVICE(0xa012); /* IntelGMA3150_Netbook_2 */
-      break;
-    case IntelGMAX3000:
-      APPEND_DEVICE(0x2972); /* Intel946GZ_1 */
-      APPEND_DEVICE(0x2973); /* Intel946GZ_2 */
-      APPEND_DEVICE(0x2982); /* IntelG35_1 */
-      APPEND_DEVICE(0x2983); /* IntelG35_2 */
-      APPEND_DEVICE(0x2992); /* IntelQ965_1 */
-      APPEND_DEVICE(0x2993); /* IntelQ965_2 */
-      APPEND_DEVICE(0x29a2); /* IntelG965_1 */
-      APPEND_DEVICE(0x29a3); /* IntelG965_2 */
-      APPEND_DEVICE(0x29b2); /* IntelQ35_1 */
-      APPEND_DEVICE(0x29b3); /* IntelQ35_2 */
-      APPEND_DEVICE(0x29c2); /* IntelG33_1 */
-      APPEND_DEVICE(0x29c3); /* IntelG33_2 */
-      APPEND_DEVICE(0x29d2); /* IntelQ33_1 */
-      APPEND_DEVICE(0x29d3); /* IntelQ33_2 */
-      APPEND_DEVICE(0x2a02); /* IntelGL960_1 */
-      APPEND_DEVICE(0x2a03); /* IntelGL960_2 */
-      APPEND_DEVICE(0x2a12); /* IntelGM965_1 */
-      APPEND_DEVICE(0x2a13); /* IntelGM965_2 */
-      break;
-    case IntelGMAX4500HD:
-      APPEND_DEVICE(0x2a42); /* IntelGMA4500MHD_1 */
-      APPEND_DEVICE(0x2a43); /* IntelGMA4500MHD_2 */
-      APPEND_DEVICE(0x2e42); /* IntelB43_1 */
-      APPEND_DEVICE(0x2e43); /* IntelB43_2 */
-      APPEND_DEVICE(0x2e92); /* IntelB43_3 */
-      APPEND_DEVICE(0x2e93); /* IntelB43_4 */
-      APPEND_DEVICE(0x2e32); /* IntelG41_1 */
-      APPEND_DEVICE(0x2e33); /* IntelG41_2 */
-      APPEND_DEVICE(0x2e22); /* IntelG45_1 */
-      APPEND_DEVICE(0x2e23); /* IntelG45_2 */
-      APPEND_DEVICE(0x2e12); /* IntelQ45_1 */
-      APPEND_DEVICE(0x2e13); /* IntelQ45_2 */
-      APPEND_DEVICE(0x0042); /* IntelHDGraphics */
-      APPEND_DEVICE(0x0046); /* IntelMobileHDGraphics */
-      APPEND_DEVICE(0x0102); /* IntelSandyBridge_1 */
-      APPEND_DEVICE(0x0106); /* IntelSandyBridge_2 */
-      APPEND_DEVICE(0x0112); /* IntelSandyBridge_3 */
-      APPEND_DEVICE(0x0116); /* IntelSandyBridge_4 */
-      APPEND_DEVICE(0x0122); /* IntelSandyBridge_5 */
-      APPEND_DEVICE(0x0126); /* IntelSandyBridge_6 */
-      APPEND_DEVICE(0x010a); /* IntelSandyBridge_7 */
-      APPEND_DEVICE(0x0080); /* IntelIvyBridge */
-      break;
-    case NvidiaBlockD3D9Layers:
+    case IntelGMA500: {
+      static const PRUint32 intelGMA500[] = {
+        0x8108, /* IntelGMA500_1 */
+        0x8109, /* IntelGMA500_2 */
+        0
+      };
+      return (const GfxDeviceFamily) &intelGMA500[0];
+    }
+    case IntelGMA900: {
+      static const PRUint32 intelGMA900[] = {
+        0x2582, /* IntelGMA900_1 */
+        0x2782, /* IntelGMA900_2 */
+        0x2592, /* IntelGMA900_3 */
+        0x2792, /* IntelGMA900_4 */
+        0
+      };
+      return (const GfxDeviceFamily) &intelGMA900[0];
+    }
+    case IntelGMA950: {
+      static const PRUint32 intelGMA950[] = {
+        0x2772, /* Intel945G_1 */
+        0x2776, /* Intel945G_2 */
+        0x27A2, /* Intel945_1 */
+        0x27A6, /* Intel945_2 */
+        0x27AE, /* Intel945_3 */
+        0
+      };
+      return (const GfxDeviceFamily) &intelGMA950[0];
+    }
+    case IntelGMA3150: {
+      static const PRUint32 intelGMA3150[] = {
+        0xA001, /* IntelGMA3150_Nettop_1 */
+        0xA002, /* IntelGMA3150_Nettop_2 */
+        0xA011, /* IntelGMA3150_Netbook_1 */
+        0xA012, /* IntelGMA3150_Netbook_2 */
+        0
+      };
+      return (const GfxDeviceFamily) &intelGMA3150[0];
+    }
+    case IntelGMAX3000: {
+      static const PRUint32 intelGMAX3000[] = {
+        0x2972, /* Intel946GZ_1 */
+        0x2973, /* Intel946GZ_2 */
+        0x2982, /* IntelG35_1 */
+        0x2983, /* IntelG35_2 */
+        0x2992, /* IntelQ965_1 */
+        0x2993, /* IntelQ965_2 */
+        0x29A2, /* IntelG965_1 */
+        0x29A3, /* IntelG965_2 */
+        0x29B2, /* IntelQ35_1 */
+        0x29B3, /* IntelQ35_2 */
+        0x29C2, /* IntelG33_1 */
+        0x29C3, /* IntelG33_2 */
+        0x29D2, /* IntelQ33_1 */
+        0x29D3, /* IntelQ33_2 */
+        0x2A02, /* IntelGL960_1 */
+        0x2A03, /* IntelGL960_2 */
+        0x2A12, /* IntelGM965_1 */
+        0x2A13, /* IntelGM965_2 */
+        0
+      };
+      return (const GfxDeviceFamily) &intelGMAX3000[0];
+    }
+    case IntelGMAX4500HD: {
+      static const PRUint32 intelGMAX4500HD[] = {
+        0x2A42, /* IntelGMA4500MHD_1 */
+        0x2A43, /* IntelGMA4500MHD_2 */
+        0x2E42, /* IntelB43_1 */
+        0x2E43, /* IntelB43_2 */
+        0x2E92, /* IntelB43_3 */
+        0x2E93, /* IntelB43_4 */
+        0x2E32, /* IntelG41_1 */
+        0x2E33, /* IntelG41_2 */
+        0x2E22, /* IntelG45_1 */
+        0x2E23, /* IntelG45_2 */
+        0x2E12, /* IntelQ45_1 */
+        0x2E13, /* IntelQ45_2 */
+        0x0042, /* IntelHDGraphics */
+        0x0046, /* IntelMobileHDGraphics */
+        0x0102, /* IntelSandyBridge_1 */
+        0x0106, /* IntelSandyBridge_2 */
+        0x0112, /* IntelSandyBridge_3 */
+        0x0116, /* IntelSandyBridge_4 */
+        0x0122, /* IntelSandyBridge_5 */
+        0x0126, /* IntelSandyBridge_6 */
+        0x010A, /* IntelSandyBridge_7 */
+        0x0080, /* IntelIvyBridge */
+        0
+      };
+      return (const GfxDeviceFamily) &intelGMAX4500HD[0];
+    }
+    case NvidiaBlockD3D9Layers: {
       // Glitches whilst scrolling (see bugs 612007, 644787, 645872)
-      APPEND_DEVICE(0x00f3); /* NV43 [GeForce 6200 (TM)] */
-      APPEND_DEVICE(0x0146); /* NV43 [Geforce Go 6600TE/6200TE (TM)] */
-      APPEND_DEVICE(0x014f); /* NV43 [GeForce 6200 (TM)] */
-      APPEND_DEVICE(0x0161); /* NV44 [GeForce 6200 TurboCache (TM)] */
-      APPEND_DEVICE(0x0162); /* NV44 [GeForce 6200SE TurboCache (TM)] */
-      APPEND_DEVICE(0x0163); /* NV44 [GeForce 6200 LE (TM)] */
-      APPEND_DEVICE(0x0164); /* NV44 [GeForce Go 6200 (TM)] */
-      APPEND_DEVICE(0x0167); /* NV43 [GeForce Go 6200/6400 (TM)] */
-      APPEND_DEVICE(0x0168); /* NV43 [GeForce Go 6200/6400 (TM)] */
-      APPEND_DEVICE(0x0169); /* NV44 [GeForce 6250 (TM)] */
-      APPEND_DEVICE(0x0222); /* NV44 [GeForce 6200 A-LE (TM)] */
-      APPEND_DEVICE(0x0240); /* C51PV [GeForce 6150 (TM)] */
-      APPEND_DEVICE(0x0241); /* C51 [GeForce 6150 LE (TM)] */
-      APPEND_DEVICE(0x0244); /* C51 [Geforce Go 6150 (TM)] */
-      APPEND_DEVICE(0x0245); /* C51 [Quadro NVS 210S/GeForce 6150LE (TM)] */
-      APPEND_DEVICE(0x0247); /* C51 [GeForce Go 6100 (TM)] */
-      APPEND_DEVICE(0x03d0); /* C61 [GeForce 6150SE nForce 430 (TM)] */
-      APPEND_DEVICE(0x03d1); /* C61 [GeForce 6100 nForce 405 (TM)] */
-      APPEND_DEVICE(0x03d2); /* C61 [GeForce 6100 nForce 400 (TM)] */
-      APPEND_DEVICE(0x03d5); /* C61 [GeForce 6100 nForce 420 (TM)] */
-      break;
-    // This should never happen, but we get a warning if we don't handle this.
-    case DeviceFamilyMax:
-      NS_WARNING("Invalid DeviceFamily id");
-      break;
+      static const PRUint32 nvidiaBlockD3D9Layers[] = {
+        0x00f3, /* NV43 [GeForce 6200 (TM)] */
+        0x0146, /* NV43 [Geforce Go 6600TE/6200TE (TM)] */
+        0x014f, /* NV43 [GeForce 6200 (TM)] */
+        0x0161, /* NV44 [GeForce 6200 TurboCache (TM)] */
+        0x0162, /* NV44 [GeForce 6200SE TurboCache (TM)] */
+        0x0163, /* NV44 [GeForce 6200 LE (TM)] */
+        0x0164, /* NV44 [GeForce Go 6200 (TM)] */
+        0x0167, /* NV43 [GeForce Go 6200/6400 (TM)] */
+        0x0168, /* NV43 [GeForce Go 6200/6400 (TM)] */
+        0x0169, /* NV44 [GeForce 6250 (TM)] */
+        0x0222, /* NV44 [GeForce 6200 A-LE (TM)] */
+        0x0240, /* C51PV [GeForce 6150 (TM)] */
+        0x0241, /* C51 [GeForce 6150 LE (TM)] */
+        0x0244, /* C51 [Geforce Go 6150 (TM)] */
+        0x0245, /* C51 [Quadro NVS 210S/GeForce 6150LE (TM)] */
+        0x0247, /* C51 [GeForce Go 6100 (TM)] */
+        0x03d0, /* C61 [GeForce 6150SE nForce 430 (TM)] */
+        0x03d1, /* C61 [GeForce 6100 nForce 405 (TM)] */
+        0x03d2, /* C61 [GeForce 6100 nForce 400 (TM)] */
+        0x03d5, /* C61 [GeForce 6100 nForce 420 (TM)] */
+        0
+      };
+      return (const GfxDeviceFamily) &nvidiaBlockD3D9Layers[0];
+    }
+    default:
+      NS_WARNING("Invalid device family");
   }
 
-  return deviceFamily;
+  return nsnull;
 }
-
-// Macro for assigning a device vendor id to a string.
-#define DECLARE_VENDOR_ID(name, deviceId) \
-  case name: \
-    mDeviceVendors[id]->AssignLiteral(deviceId); \
-    break;
-
-const nsAString& GfxDriverInfo::GetDeviceVendor(DeviceVendor id)
-{
-  NS_ASSERTION(id >= 0 && id < DeviceVendorMax, "DeviceVendor id is out of range");
-
-  if (mDeviceVendors[id])
-    return *mDeviceVendors[id];
-
-  mDeviceVendors[id] = new nsString();
-
-  switch (id) {
-    DECLARE_VENDOR_ID(VendorAll, "");
-    DECLARE_VENDOR_ID(VendorIntel, "0x8086");
-    DECLARE_VENDOR_ID(VendorNVIDIA, "0x10de");
-    DECLARE_VENDOR_ID(VendorAMD, "0x1022");
-    DECLARE_VENDOR_ID(VendorATI, "0x1002");
-    // Suppress a warning.
-    DECLARE_VENDOR_ID(DeviceVendorMax, "");
-  }
-
-  return *mDeviceVendors[id];
-}
--- a/widget/src/xpwidgets/GfxDriverInfo.h
+++ b/widget/src/xpwidgets/GfxDriverInfo.h
@@ -38,17 +38,16 @@
 #include "prtypes.h"
 #include "nsString.h"
 
 #ifndef __mozilla_widget_GfxDriverInfo_h__
 #define __mozilla_widget_GfxDriverInfo_h__
 
 #define V(a,b,c,d) GFX_DRIVER_VERSION(a,b,c,d)
 
-// Macros for adding a blocklist item to the static list.
 #define APPEND_TO_DRIVER_BLOCKLIST(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, suggestedVersion) \
     mDriverInfo->AppendElement(GfxDriverInfo(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, suggestedVersion))
 #define APPEND_TO_DRIVER_BLOCKLIST2(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion) \
     mDriverInfo->AppendElement(GfxDriverInfo(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion))
 
 namespace mozilla {
 namespace widget {
 
@@ -82,51 +81,42 @@ enum VersionComparisonOp {
 
 enum DeviceFamily {
   IntelGMA500,
   IntelGMA900,
   IntelGMA950,
   IntelGMA3150,
   IntelGMAX3000,
   IntelGMAX4500HD,
-  NvidiaBlockD3D9Layers,
-  DeviceFamilyMax
+  NvidiaBlockD3D9Layers
 };
 
-enum DeviceVendor {
-  VendorAll,
-  VendorIntel,
-  VendorNVIDIA,
-  VendorAMD,
-  VendorATI,
-  DeviceVendorMax
-};
-
-/* Array of devices to match, or an empty array for all devices */
-typedef nsTArray<nsString> GfxDeviceFamily;
+/* A zero-terminated array of devices to match, or all devices */
+typedef PRUint32* GfxDeviceFamily;
 
 struct GfxDriverInfo
 {
   // If |ownDevices| is true, you are transferring ownership of the devices
   // array, and it will be deleted when this GfxDriverInfo is destroyed.
-  GfxDriverInfo(OperatingSystem os, nsAString& vendor, GfxDeviceFamily* devices,
+  GfxDriverInfo(OperatingSystem os, PRUint32 vendor, GfxDeviceFamily devices,
                 PRInt32 feature, PRInt32 featureStatus, VersionComparisonOp op,
                 PRUint64 driverVersion, const char *suggestedVersion = nsnull,
                 bool ownDevices = false);
 
   GfxDriverInfo();
   GfxDriverInfo(const GfxDriverInfo&);
   ~GfxDriverInfo();
 
   OperatingSystem mOperatingSystem;
 
-  nsString mAdapterVendor;
+  PRUint32 mAdapterVendor;
+  static PRUint32 allAdapterVendors;
 
-  static GfxDeviceFamily* const allDevices;
-  GfxDeviceFamily* mDevices;
+  GfxDeviceFamily mDevices;
+  static GfxDeviceFamily allDevices;
 
   // Whether the mDevices array should be deleted when this structure is
   // deallocated. False by default.
   bool mDeleteDevices;
 
   /* A feature from nsIGfxInfo, or all features */
   PRInt32 mFeature;
   static PRInt32 allFeatures;
@@ -136,23 +126,24 @@ struct GfxDriverInfo
 
   VersionComparisonOp mComparisonOp;
 
   /* versions are assumed to be A.B.C.D packed as 0xAAAABBBBCCCCDDDD */
   PRUint64 mDriverVersion;
   PRUint64 mDriverVersionMax;
   static PRUint64 allDriverVersions;
 
+  static PRUint32 vendorIntel;
+  static PRUint32 vendorNVIDIA;
+  static PRUint32 vendorAMD;
+  static PRUint32 vendorATI;
+
   const char *mSuggestedVersion;
 
-  static const GfxDeviceFamily* GetDeviceFamily(DeviceFamily id);
-  static GfxDeviceFamily* mDeviceFamilies[DeviceFamilyMax];
-
-  static const nsAString& GetDeviceVendor(DeviceVendor id);
-  static nsAString* mDeviceVendors[DeviceVendorMax];
+  static const GfxDeviceFamily GetDeviceFamily(DeviceFamily id);
 };
 
 #define GFX_DRIVER_VERSION(a,b,c,d) \
   ((PRUint64(a)<<48) | (PRUint64(b)<<32) | (PRUint64(c)<<16) | PRUint64(d))
 
 inline bool
 ParseDriverVersion(nsAString& aVersion, PRUint64 *aNumericVersion)
 {
--- a/widget/src/xpwidgets/GfxInfoBase.cpp
+++ b/widget/src/xpwidgets/GfxInfoBase.cpp
@@ -75,26 +75,20 @@ public:
   virtual ~ShutdownObserver() {}
 
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Observe(nsISupports *subject, const char *aTopic,
                      const PRUnichar *aData)
   {
     MOZ_ASSERT(strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID) == 0);
-
-    delete GfxInfoBase::mDriverInfo;
-    GfxInfoBase::mDriverInfo = nsnull;
-
-    for (PRUint32 i = 0; i < DeviceFamilyMax; i++)
-      delete GfxDriverInfo::mDeviceFamilies[i];
-
-    for (PRUint32 i = 0; i < DeviceVendorMax; i++)
-      delete GfxDriverInfo::mDeviceVendors[i];
-
+    if (GfxInfoBase::mDriverInfo) {
+      delete GfxInfoBase::mDriverInfo;
+      GfxInfoBase::mDriverInfo = nsnull;
+    }
     return NS_OK;
   }
 };
 
 NS_IMPL_ISUPPORTS1(ShutdownObserver, nsIObserver);
 
 void InitGfxDriverInfoShutdownObserver()
 {
@@ -308,40 +302,53 @@ BlacklistOSToOperatingSystem(const nsASt
   else if (os == NS_LITERAL_STRING("Android"))
     return DRIVER_OS_ANDROID;
   else if (os == NS_LITERAL_STRING("All"))
     return DRIVER_OS_ALL;
 
   return DRIVER_OS_UNKNOWN;
 }
 
-static GfxDeviceFamily*
+static PRUint32
+BlacklistHexToInt(const nsAString& aHex)
+{
+  PRInt32 err;
+  // nsAString doesn't have .ToInteger() :(
+  nsAutoString hex(aHex);
+  PRInt32 value = hex.ToInteger(&err, 16);
+  if (NS_FAILED(err))
+    return 0;
+  return (PRUint32) value;
+}
+
+static PRUint32*
 BlacklistDevicesToDeviceFamily(nsIDOMNodeList* aDevices)
 {
   PRUint32 length;
   if (NS_FAILED(aDevices->GetLength(&length)))
     return nsnull;
 
-  // For each <device>, get its device ID, and return a freshly-allocated
-  // GfxDeviceFamily with the contents of that array.
-  GfxDeviceFamily* deviceIds = new GfxDeviceFamily;
+  // For each <device>, get its device ID, and return a freshly-allocated array
+  // with the contents of that array.
+  nsAutoArrayPtr<PRUint32> deviceIds(new PRUint32[length + 1]);
+  memset(deviceIds, 0, sizeof(PRUint32) * (length + 1));
 
   for (PRUint32 i = 0; i < length; ++i) {
     nsCOMPtr<nsIDOMNode> node;
     if (NS_FAILED(aDevices->Item(i, getter_AddRefs(node))) || !node)
       continue;
 
     nsAutoString deviceValue;
     if (!BlacklistNodeToTextValue(node, deviceValue))
       continue;
 
-    deviceIds->AppendElement(deviceValue);
+    deviceIds[i] = BlacklistHexToInt(deviceValue);
   }
 
-  return deviceIds;
+  return deviceIds.forget();
 }
 
 static PRInt32
 BlacklistFeatureToGfxFeature(const nsAString& aFeature)
 {
   if (aFeature == NS_LITERAL_STRING("DIRECT2D"))
     return nsIGfxInfo::FEATURE_DIRECT2D;
   else if (aFeature == NS_LITERAL_STRING("DIRECT3D_9_LAYERS"))
@@ -466,34 +473,34 @@ BlacklistEntryToDriverInfo(nsIDOMNode* a
     BlacklistNodeToTextValue(dataNode, dataValue);
     aDriverInfo.mOperatingSystem = BlacklistOSToOperatingSystem(dataValue);
   }
 
   // <vendor>0x8086</vendor>
   if (BlacklistNodeGetChildByName(element, NS_LITERAL_STRING("vendor"),
                                   getter_AddRefs(dataNode))) {
     BlacklistNodeToTextValue(dataNode, dataValue);
-    aDriverInfo.mAdapterVendor = dataValue;
+    aDriverInfo.mAdapterVendor = BlacklistHexToInt(dataValue);
   }
 
   // <devices>
   //   <device>0x2582</device>
   //   <device>0x2782</device>
   // </devices>
   if (BlacklistNodeGetChildByName(element, NS_LITERAL_STRING("devices"),
                                   getter_AddRefs(dataNode))) {
     nsCOMPtr<nsIDOMElement> devicesElement = do_QueryInterface(dataNode);
     if (devicesElement) {
 
       // Get only the <device> nodes, because BlacklistDevicesToDeviceFamily
       // assumes it is passed no other nodes.
       nsCOMPtr<nsIDOMNodeList> devices;
       if (NS_SUCCEEDED(devicesElement->GetElementsByTagName(NS_LITERAL_STRING("device"),
                                                             getter_AddRefs(devices)))) {
-        GfxDeviceFamily* deviceIds = BlacklistDevicesToDeviceFamily(devices);
+        PRUint32* deviceIds = BlacklistDevicesToDeviceFamily(devices);
         if (deviceIds) {
           // Get GfxDriverInfo to adopt the devices array we created.
           aDriverInfo.mDeleteDevices = true;
           aDriverInfo.mDevices = deviceIds;
         }
       }
     }
   }
@@ -536,29 +543,25 @@ BlacklistEntryToDriverInfo(nsIDOMNode* a
 static void
 BlacklistEntriesToDriverInfo(nsIDOMNodeList* aBlacklistEntries,
                              nsTArray<GfxDriverInfo>& aDriverInfo)
 {
   PRUint32 length;
   if (NS_FAILED(aBlacklistEntries->GetLength(&length)))
     return;
 
-  aDriverInfo.Clear();
-  aDriverInfo.SetLength(length);
   for (PRUint32 i = 0; i < length; ++i) {
     nsCOMPtr<nsIDOMNode> blacklistEntry;
     if (NS_SUCCEEDED(aBlacklistEntries->Item(i,
                                              getter_AddRefs(blacklistEntry))) &&
         blacklistEntry) {
       GfxDriverInfo di;
       if (BlacklistEntryToDriverInfo(blacklistEntry, di)) {
-        aDriverInfo[i] = di;
+        aDriverInfo.AppendElement(di);
       }
-      // Prevent di falling out of scope from destroying the devices.
-      di.mDeleteDevices = false;
     }
   }
 }
 
 NS_IMETHODIMP
 GfxInfoBase::Observe(nsISupports* aSubject, const char* aTopic,
                      const PRUnichar* aData)
 {
@@ -568,16 +571,17 @@ GfxInfoBase::Observe(nsISupports* aSubje
       nsCOMPtr<nsIDOMNodeList> blacklistEntries;
       if (NS_SUCCEEDED(gfxItems->
             GetElementsByTagName(NS_LITERAL_STRING(BLACKLIST_ENTRY_TAG_NAME),
                                  getter_AddRefs(blacklistEntries))) &&
           blacklistEntries)
       {
         nsTArray<GfxDriverInfo> driverInfo;
         BlacklistEntriesToDriverInfo(blacklistEntries, driverInfo);
+
         EvaluateDownloadedBlacklist(driverInfo);
       }
     }
   }
 
   return NS_OK;
 }
 
@@ -588,18 +592,16 @@ GfxInfoBase::GfxInfoBase()
 
 GfxInfoBase::~GfxInfoBase()
 {
 }
 
 nsresult
 GfxInfoBase::Init()
 {
-  InitGfxDriverInfoShutdownObserver();
-
   nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
   if (os) {
     os->AddObserver(this, "blocklist-data-gfxItems", true);
   }
 
   return NS_OK;
 }
 
@@ -617,46 +619,46 @@ GfxInfoBase::GetFeatureStatus(PRInt32 aF
 PRInt32
 GfxInfoBase::FindBlocklistedDeviceInList(const nsTArray<GfxDriverInfo>& info,
                                          nsAString& aSuggestedVersion,
                                          PRInt32 aFeature,
                                          OperatingSystem os)
 {
   PRInt32 status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
 
-  nsAutoString adapterVendorID;
-  nsAutoString adapterDeviceID;
+  PRUint32 adapterVendorID = 0;
+  PRUint32 adapterDeviceID = 0;
   nsAutoString adapterDriverVersionString;
-  if (NS_FAILED(GetAdapterVendorID(adapterVendorID)) ||
-      NS_FAILED(GetAdapterDeviceID(adapterDeviceID)) ||
+  if (NS_FAILED(GetAdapterVendorID(&adapterVendorID)) ||
+      NS_FAILED(GetAdapterDeviceID(&adapterDeviceID)) ||
       NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString)))
   {
     return NS_OK;
   }
 
   PRUint64 driverVersion;
   ParseDriverVersion(adapterDriverVersionString, &driverVersion);
 
   PRUint32 i = 0;
   for (; i < info.Length(); i++) {
     if (info[i].mOperatingSystem != DRIVER_OS_ALL &&
         info[i].mOperatingSystem != os)
     {
       continue;
     }
 
-    if (info[i].mAdapterVendor != GfxDriverInfo::GetDeviceVendor(VendorAll) &&
+    if (info[i].mAdapterVendor != GfxDriverInfo::allAdapterVendors &&
         info[i].mAdapterVendor != adapterVendorID) {
       continue;
     }
 
-    if (info[i].mDevices != GfxDriverInfo::allDevices && info[i].mDevices->Length()) {
+    if (info[i].mDevices != GfxDriverInfo::allDevices) {
         bool deviceMatches = false;
-        for (PRUint32 j = 0; j < info[i].mDevices->Length(); j++) {
-            if ((*info[i].mDevices)[j] == adapterDeviceID) {
+        for (const PRUint32 *devices = info[i].mDevices; *devices; ++devices) {
+            if (*devices == adapterDeviceID) {
                 deviceMatches = true;
                 break;
             }
         }
 
         if (!deviceMatches) {
             continue;
         }
@@ -748,40 +750,38 @@ GfxInfoBase::GetFeatureStatusImpl(PRInt3
   }
 
   // If an operating system was provided by the derived GetFeatureStatusImpl,
   // grab it here. Otherwise, the OS is unknown.
   OperatingSystem os = DRIVER_OS_UNKNOWN;
   if (aOS)
     os = *aOS;
 
-  nsAutoString adapterVendorID;
-  nsAutoString adapterDeviceID;
+  PRUint32 adapterVendorID = 0;
+  PRUint32 adapterDeviceID = 0;
   nsAutoString adapterDriverVersionString;
-  if (NS_FAILED(GetAdapterVendorID(adapterVendorID)) ||
-      NS_FAILED(GetAdapterDeviceID(adapterDeviceID)) ||
+  if (NS_FAILED(GetAdapterVendorID(&adapterVendorID)) ||
+      NS_FAILED(GetAdapterDeviceID(&adapterDeviceID)) ||
       NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString)))
   {
     return NS_OK;
   }
 
   PRUint64 driverVersion;
   ParseDriverVersion(adapterDriverVersionString, &driverVersion);
 
   // Check if the device is blocked from the downloaded blocklist. If not, check
   // the static list after that. This order is used so that we can later escape
   // out of static blocks (i.e. if we were wrong or something was patched, we
   // can back out our static block without doing a release).
-  PRInt32 status;
-  if (aDriverInfo.Length()) {
-    status = FindBlocklistedDeviceInList(aDriverInfo, aSuggestedVersion, aFeature, os);
-  } else {
-    if (!mDriverInfo) {
-      mDriverInfo = new nsTArray<GfxDriverInfo>();
-    }
+  InitGfxDriverInfoShutdownObserver();
+  if (!mDriverInfo)
+    mDriverInfo = new nsTArray<GfxDriverInfo>();
+  PRInt32 status = FindBlocklistedDeviceInList(aDriverInfo, aSuggestedVersion, aFeature, os);
+  if (status == nsIGfxInfo::FEATURE_STATUS_UNKNOWN) {
     status = FindBlocklistedDeviceInList(GetGfxDriverInfo(), aSuggestedVersion, aFeature, os);
   }
 
   // It's now done being processed. It's safe to set the status to NO_INFO.
   if (status == nsIGfxInfo::FEATURE_STATUS_UNKNOWN) {
     *aStatus = nsIGfxInfo::FEATURE_NO_INFO;
   } else {
     *aStatus = status;
--- a/widget/src/xpwidgets/GfxInfoX11.cpp
+++ b/widget/src/xpwidgets/GfxInfoX11.cpp
@@ -429,42 +429,42 @@ GfxInfo::GetAdapterDriverDate(nsAString 
 
 /* readonly attribute DOMString adapterDriverDate2; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate)
 {
   return NS_ERROR_FAILURE;
 }
 
-/* readonly attribute DOMString adapterVendorID; */
+/* readonly attribute unsigned long adapterVendorID; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID)
+GfxInfo::GetAdapterVendorID(PRUint32 *aAdapterVendorID)
 {
-  aAdapterVendorID.AssignLiteral("");
+  *aAdapterVendorID = 0;
   return NS_OK;
 }
 
-/* readonly attribute DOMString adapterVendorID2; */
+/* readonly attribute unsigned long adapterVendorID2; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID)
+GfxInfo::GetAdapterVendorID2(PRUint32 *aAdapterVendorID)
 {
   return NS_ERROR_FAILURE;
 }
 
-/* readonly attribute DOMString adapterDeviceID; */
+/* readonly attribute unsigned long adapterDeviceID; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID)
+GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
 {
-  aAdapterDeviceID.AssignLiteral("");
+  *aAdapterDeviceID = 0;
   return NS_OK;
 }
 
-/* readonly attribute DOMString adapterDeviceID2; */
+/* readonly attribute unsigned long adapterDeviceID2; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID)
+GfxInfo::GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID)
 {
   return NS_ERROR_FAILURE;
 }
 
 /* readonly attribute boolean isGPU2Active; */
 NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
 {
--- a/widget/src/xpwidgets/GfxInfoX11.h
+++ b/widget/src/xpwidgets/GfxInfoX11.h
@@ -53,25 +53,25 @@ public:
   // rest is brought forward from GfxInfoBase.
   NS_SCRIPTABLE NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetAzureEnabled(bool *aAzureEnabled);
   NS_SCRIPTABLE NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
   NS_SCRIPTABLE NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID(PRUint32 *aAdapterVendorID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID(PRUint32 *aAdapterDeviceID);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
-  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterVendorID2(PRUint32 *aAdapterVendorID);
+  NS_SCRIPTABLE NS_IMETHOD GetAdapterDeviceID2(PRUint32 *aAdapterDeviceID);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
   NS_SCRIPTABLE NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
   NS_SCRIPTABLE NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;