Bug 918386 - Add webidl for adapter subsys. Only relevant on Windows. r=vvukicevic.
authorMilan Sreckovic <milan@mozilla.com>
Wed, 09 Jul 2014 14:21:49 -0400
changeset 202153 0519b4b09abb7f5c316e22d5f9669d0ca324fabe
parent 202152 ba55afbced84f67f912e1cae551299dda8d01d6d
child 202154 5900f66edaf9dec24d1c5583e394e1f2b587d3d1
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-esr52@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvvukicevic
bugs918386
milestone33.0a1
Bug 918386 - Add webidl for adapter subsys. Only relevant on Windows. r=vvukicevic.
widget/android/GfxInfo.cpp
widget/android/GfxInfo.h
widget/cocoa/GfxInfo.h
widget/cocoa/GfxInfo.mm
widget/gonk/GfxInfo.cpp
widget/gonk/GfxInfo.h
widget/nsIGfxInfo.idl
widget/windows/GfxInfo.cpp
widget/windows/GfxInfo.h
widget/xpwidgets/GfxInfoX11.cpp
widget/xpwidgets/GfxInfoX11.h
--- a/widget/android/GfxInfo.cpp
+++ b/widget/android/GfxInfo.cpp
@@ -315,32 +315,50 @@ GfxInfo::GetAdapterDeviceID(nsAString & 
 /* readonly attribute DOMString adapterDeviceID2; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID)
 {
   EnsureInitialized();
   return NS_ERROR_FAILURE;
 }
 
+/* readonly attribute DOMString adapterSubsysID; */
+NS_IMETHODIMP
+GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID)
+{
+  EnsureInitialized();
+  return NS_ERROR_FAILURE;
+}
+
+/* readonly attribute DOMString adapterSubsysID2; */
+NS_IMETHODIMP
+GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID)
+{
+  EnsureInitialized();
+  return NS_ERROR_FAILURE;
+}
+
 /* readonly attribute boolean isGPU2Active; */
 NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
 {
   EnsureInitialized();
   return NS_ERROR_FAILURE;
 }
 
 void
 GfxInfo::AddCrashReportAnnotations()
 {
 #if defined(MOZ_CRASHREPORTER)
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterVendorID"),
                                      mGLStrings->Vendor());
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDeviceID"),
                                      mGLStrings->Renderer());
+  CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDriverVersion"),
+                                     mGLStrings->Version());
 
   /* 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 */
   nsAutoCString note;
   note.AppendPrintf("AdapterDescription: '%s'\n", mAdapterDescription.get());
 
   CrashReporter::AppendAppNotesToCrashReport(note);
 #endif
--- a/widget/android/GfxInfo.h
+++ b/widget/android/GfxInfo.h
@@ -32,23 +32,25 @@ public:
   NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
   NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
   NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
   NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
   NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
   NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
   NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
   NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
+  NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID);
   NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
   NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
   NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
   NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
   NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
   NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
   NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
+  NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID);
   NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
   NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
   NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
   NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;
 
--- a/widget/cocoa/GfxInfo.h
+++ b/widget/cocoa/GfxInfo.h
@@ -25,23 +25,25 @@ public:
   NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
   NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
   NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
   NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
   NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
   NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
   NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
   NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
+  NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID);
   NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
   NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
   NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
   NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
   NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
   NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
   NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
+  NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID);
   NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
   NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
   NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
   NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
 
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;
--- a/widget/cocoa/GfxInfo.mm
+++ b/widget/cocoa/GfxInfo.mm
@@ -240,39 +240,57 @@ GfxInfo::GetAdapterDeviceID(nsAString & 
 
 /* readonly attribute DOMString adapterDeviceID2; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID)
 {
   return NS_ERROR_FAILURE;
 }
 
+/* readonly attribute DOMString adapterSubsysID; */
+NS_IMETHODIMP
+GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID)
+{
+  return NS_ERROR_FAILURE;
+}
+
+/* readonly attribute DOMString adapterSubsysID2; */
+NS_IMETHODIMP
+GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID)
+{
+  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;
-  nsAutoCString narrowDeviceID, narrowVendorID;
+  nsString deviceID, vendorID, driverVersion;
+  nsAutoCString narrowDeviceID, narrowVendorID, narrowDriverVersion;
 
   GetAdapterDeviceID(deviceID);
   CopyUTF16toUTF8(deviceID, narrowDeviceID);
   GetAdapterVendorID(vendorID);
   CopyUTF16toUTF8(vendorID, narrowVendorID);
+  GetAdapterDriverVersion(driverVersion);
+  CopyUTF16toUTF8(driverVersion, narrowDriverVersion);
 
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterVendorID"),
                                      narrowVendorID);
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDeviceID"),
                                      narrowDeviceID);
+  CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDriverVersion"),
+                                     narrowDriverVersion);
   /* 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 */
   nsAutoCString note;
   /* AppendPrintf only supports 32 character strings, mrghh. */
   note.Append("AdapterVendorID: ");
   note.Append(narrowVendorID);
   note.Append(", AdapterDeviceID: ");
   note.Append(narrowDeviceID);
--- a/widget/gonk/GfxInfo.cpp
+++ b/widget/gonk/GfxInfo.cpp
@@ -135,16 +135,30 @@ GfxInfo::GetAdapterDeviceID(nsAString & 
 
 /* readonly attribute DOMString adapterDeviceID2; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID)
 {
   return NS_ERROR_FAILURE;
 }
 
+/* readonly attribute DOMString adapterSubsysID; */
+NS_IMETHODIMP
+GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID)
+{
+  return NS_ERROR_FAILURE;
+}
+
+/* readonly attribute DOMString adapterSubsysID2; */
+NS_IMETHODIMP
+GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID)
+{
+  return NS_ERROR_FAILURE;
+}
+
 /* readonly attribute boolean isGPU2Active; */
 NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
 {
   return NS_ERROR_FAILURE;
 }
 
 const nsTArray<GfxDriverInfo>&
--- a/widget/gonk/GfxInfo.h
+++ b/widget/gonk/GfxInfo.h
@@ -24,23 +24,25 @@ public:
   NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
   NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
   NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
   NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
   NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
   NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
   NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
   NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
+  NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID);
   NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
   NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
   NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
   NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
   NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
   NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
   NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
+  NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID);
   NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
   NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
   NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
   NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;
 
--- a/widget/nsIGfxInfo.idl
+++ b/widget/nsIGfxInfo.idl
@@ -3,17 +3,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 /* NOTE: this interface is completely undesigned, not stable and likely to change */
 
-[scriptable, uuid(1194ba76-aeb5-48df-abfd-844740ce3696)]
+[scriptable, uuid(27212e99-ed25-449b-b79f-32ecb88d251e)]
 interface nsIGfxInfo : nsISupports
 {
   /*
    * These are win32-specific
    */
   readonly attribute boolean D2DEnabled;
   readonly attribute boolean DWriteEnabled;
   readonly attribute DOMString DWriteVersion;
@@ -32,16 +32,19 @@ interface nsIGfxInfo : nsISupports
   
   /* These types are inspired by DXGI_ADAPTER_DESC */
   readonly attribute DOMString adapterVendorID;
   readonly attribute DOMString adapterVendorID2;
   
   readonly attribute DOMString adapterDeviceID;
   readonly attribute DOMString adapterDeviceID2;
 
+  readonly attribute DOMString adapterSubsysID;
+  readonly attribute DOMString adapterSubsysID2;
+
   /**
    * The amount of RAM in MB in the display adapter.
    */
   readonly attribute DOMString adapterRAM;
   readonly attribute DOMString adapterRAM2;
   
   readonly attribute DOMString adapterDriverVersion;
   readonly attribute DOMString adapterDriverVersion2;
--- a/widget/windows/GfxInfo.cpp
+++ b/widget/windows/GfxInfo.cpp
@@ -387,17 +387,17 @@ GfxInfo::Init()
       }
     }
 
     SetupDiDestroyDeviceInfoList(devinfo);
   }
 
   mAdapterVendorID.AppendPrintf("0x%04x", ParseIDFromDeviceID(mDeviceID, "VEN_", 4));
   mAdapterDeviceID.AppendPrintf("0x%04x", ParseIDFromDeviceID(mDeviceID, "&DEV_", 4));
-  mAdapterSubsysID  = ParseIDFromDeviceID(mDeviceID,  "&SUBSYS_", 8);
+  mAdapterSubsysID.AppendPrintf("%08x", 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);
   if (hresult == NOERROR) {
@@ -491,17 +491,17 @@ GfxInfo::Init()
               mHasDualGPU = true;
               mDeviceString2 = value;
               mDeviceID2 = deviceID2;
               mDeviceKey2 = driverKey2;
               mDriverVersion2 = driverVersion2;
               mDriverDate2 = driverDate2;
               mAdapterVendorID2.AppendPrintf("0x%04x", adapterVendorID2);
               mAdapterDeviceID2.AppendPrintf("0x%04x", adapterDeviceID2);
-              mAdapterSubsysID2 = ParseIDFromDeviceID(mDeviceID2, "&SUBSYS_", 8);
+              mAdapterSubsysID2.AppendPrintf("%08x", ParseIDFromDeviceID(mDeviceID2, "&SUBSYS_", 8));
               break;
             }
           }
         }
       }
 
       SetupDiDestroyDeviceInfoList(devinfo);
     }
@@ -679,16 +679,32 @@ GfxInfo::GetAdapterDeviceID(nsAString & 
 /* readonly attribute DOMString adapterDeviceID2; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID)
 {
   aAdapterDeviceID = mAdapterDeviceID2;
   return NS_OK;
 }
 
+/* readonly attribute DOMString adapterSubsysID; */
+NS_IMETHODIMP
+GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID)
+{
+  aAdapterSubsysID = mAdapterSubsysID;
+  return NS_OK;
+}
+
+/* readonly attribute DOMString adapterSubsysID2; */
+NS_IMETHODIMP
+GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID)
+{
+  aAdapterSubsysID = mAdapterSubsysID2;
+  return NS_OK;
+}
+
 /* readonly attribute boolean isGPU2Active; */
 NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
 {
   *aIsGPU2Active = mIsGPU2Active;
   return NS_OK;
 }
 
@@ -714,70 +730,80 @@ GfxInfo::AddCrashReportAnnotations()
 {
 #if defined(MOZ_CRASHREPORTER)
   CheckForCiscoVPN();
 
   if (mHasDriverVersionMismatch) {
     CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("DriverVersionMismatch\n"));
   }
 
-  nsString deviceID, vendorID;
-  nsCString narrowDeviceID, narrowVendorID;
-  nsAutoString adapterDriverVersionString;
+  nsString deviceID, vendorID, driverVersion, subsysID;
+  nsCString narrowDeviceID, narrowVendorID, narrowDriverVersion, narrowSubsysID;
 
   GetAdapterDeviceID(deviceID);
   CopyUTF16toUTF8(deviceID, narrowDeviceID);
   GetAdapterVendorID(vendorID);
   CopyUTF16toUTF8(vendorID, narrowVendorID);
-  GetAdapterDriverVersion(adapterDriverVersionString);
+  GetAdapterDriverVersion(driverVersion);
+  CopyUTF16toUTF8(driverVersion, narrowDriverVersion);
+  GetAdapterSubsysID(subsysID);
+  CopyUTF16toUTF8(subsysID, narrowSubsysID);
 
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterVendorID"),
                                      narrowVendorID);
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDeviceID"),
                                      narrowDeviceID);
-  
+  CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDriverVersion"),
+                                     narrowDriverVersion);
+  CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterSubsysID"),
+                                     narrowSubsysID);
+
   /* 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 */
   nsAutoCString note;
   /* AppendPrintf only supports 32 character strings, mrghh. */
   note.AppendLiteral("AdapterVendorID: ");
   note.Append(narrowVendorID);
   note.AppendLiteral(", AdapterDeviceID: ");
   note.Append(narrowDeviceID);
-  note.AppendPrintf(", AdapterSubsysID: %08x, ", mAdapterSubsysID);
-  note.AppendLiteral("AdapterDriverVersion: ");
-  note.Append(NS_LossyConvertUTF16toASCII(adapterDriverVersionString));
+  note.AppendLiteral(", AdapterSubsysID: ");
+  note.Append(narrowSubsysID);
+  note.AppendLiteral(", AdapterDriverVersion: ");
+  note.Append(NS_LossyConvertUTF16toASCII(driverVersion));
 
   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.AppendLiteral(", ");
     LossyAppendUTF16toASCII(mDeviceID, note);
     note.AppendLiteral(", ");
     LossyAppendUTF16toASCII(mDeviceKeyDebug, note);
     LossyAppendUTF16toASCII(mDeviceKeyDebug, note);
   }
   note.Append("\n");
 
   if (mHasDualGPU) {
-    nsString deviceID2, vendorID2;
+    nsString deviceID2, vendorID2, subsysID2;
     nsAutoString adapterDriverVersionString2;
-    nsCString narrowDeviceID2, narrowVendorID2;
+    nsCString narrowDeviceID2, narrowVendorID2, narrowSubsysID2;
 
     note.AppendLiteral("Has dual GPUs. GPU #2: ");
     GetAdapterDeviceID2(deviceID2);
     CopyUTF16toUTF8(deviceID2, narrowDeviceID2);
     GetAdapterVendorID2(vendorID2);
     CopyUTF16toUTF8(vendorID2, narrowVendorID2);
     GetAdapterDriverVersion2(adapterDriverVersionString2);
+    GetAdapterSubsysID(subsysID2);
+    CopyUTF16toUTF8(subsysID2, narrowSubsysID2);
     note.AppendLiteral("AdapterVendorID2: ");
     note.Append(narrowVendorID2);
     note.AppendLiteral(", AdapterDeviceID2: ");
     note.Append(narrowDeviceID2);
-    note.AppendPrintf(", AdapterSubsysID2: %08x, ", mAdapterSubsysID2);
-    note.AppendPrintf("AdapterDriverVersion2: ");
+    note.AppendLiteral(", AdapterSubsysID2: ");
+    note.Append(narrowSubsysID2);
+    note.AppendLiteral(", AdapterDriverVersion2: ");
     note.Append(NS_LossyConvertUTF16toASCII(adapterDriverVersionString2));
   }
   CrashReporter::AppendAppNotesToCrashReport(note);
 
 #endif
 }
 
 static OperatingSystem
--- a/widget/windows/GfxInfo.h
+++ b/widget/windows/GfxInfo.h
@@ -23,23 +23,25 @@ public:
   NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
   NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
   NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
   NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
   NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
   NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
   NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
   NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
+  NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID);
   NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
   NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
   NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
   NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
   NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
   NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
   NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
+  NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID);
   NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
   NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
   NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
   NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;
 
@@ -67,25 +69,25 @@ private:
   nsString mDeviceString;
   nsString mDeviceID;
   nsString mDriverVersion;
   nsString mDriverDate;
   nsString mDeviceKey;
   nsString mDeviceKeyDebug;
   nsString mAdapterVendorID;
   nsString mAdapterDeviceID;
-  uint32_t mAdapterSubsysID;
+  nsString mAdapterSubsysID;
   nsString mDeviceString2;
   nsString mDriverVersion2;
   nsString mDeviceID2;
   nsString mDriverDate2;
   nsString mDeviceKey2;
   nsString mAdapterVendorID2;
   nsString mAdapterDeviceID2;
-  uint32_t mAdapterSubsysID2;
+  nsString mAdapterSubsysID2;
   uint32_t mWindowsVersion;
   bool mHasDualGPU;
   bool mIsGPU2Active;
   bool mHasDriverVersionMismatch;
 };
 
 } // namespace widget
 } // namespace mozilla
--- a/widget/xpwidgets/GfxInfoX11.cpp
+++ b/widget/xpwidgets/GfxInfoX11.cpp
@@ -507,16 +507,30 @@ GfxInfo::GetAdapterDeviceID(nsAString & 
 
 /* readonly attribute DOMString adapterDeviceID2; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID)
 {
   return NS_ERROR_FAILURE;
 }
 
+/* readonly attribute DOMString adapterSubsysID; */
+NS_IMETHODIMP
+GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID)
+{
+  return NS_ERROR_FAILURE;
+}
+
+/* readonly attribute DOMString adapterSubsysID2; */
+NS_IMETHODIMP
+GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID)
+{
+  return NS_ERROR_FAILURE;
+}
+
 /* readonly attribute boolean isGPU2Active; */
 NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
 {
   return NS_ERROR_FAILURE;
 }
 
 #ifdef DEBUG
--- a/widget/xpwidgets/GfxInfoX11.h
+++ b/widget/xpwidgets/GfxInfoX11.h
@@ -22,23 +22,25 @@ public:
   NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
   NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
   NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
   NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
   NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
   NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
   NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
   NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
+  NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID);
   NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
   NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
   NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
   NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
   NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
   NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
   NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
+  NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID);
   NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
   NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
   NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
   NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;