#500: M1458270 M1452576 M1459162 M1450688 M1456975 M1459693 M1464784

This commit is contained in:
Cameron Kaiser
2018-06-14 20:09:00 -07:00
parent e2a5d0b4cb
commit 14a6deb011
10 changed files with 76 additions and 29 deletions
+16 -2
View File
@@ -45,6 +45,7 @@ using mozilla::MutexAutoLock;
nsTArray<GfxDriverInfo>* GfxInfoBase::mDriverInfo;
bool GfxInfoBase::mDriverInfoObserverInitialized;
bool GfxInfoBase::mShutdownOccurred;
// Observes for shutdown so that the child GfxDriverInfo list is freed.
class ShutdownObserver : public nsIObserver
@@ -64,11 +65,17 @@ public:
delete GfxInfoBase::mDriverInfo;
GfxInfoBase::mDriverInfo = nullptr;
for (uint32_t i = 0; i < DeviceFamilyMax; i++)
for (uint32_t i = 0; i < DeviceFamilyMax; i++) {
delete GfxDriverInfo::mDeviceFamilies[i];
GfxDriverInfo::mDeviceFamilies[i] = nullptr;
}
for (uint32_t i = 0; i < DeviceVendorMax; i++)
for (uint32_t i = 0; i < DeviceVendorMax; i++) {
delete GfxDriverInfo::mDeviceVendors[i];
GfxDriverInfo::mDeviceVendors[i] = nullptr;
}
GfxInfoBase::mShutdownOccurred = true;
return NS_OK;
}
@@ -911,6 +918,13 @@ GfxInfoBase::GetFeatureStatusImpl(int32_t aFeature,
return NS_OK;
}
if (mShutdownOccurred) {
// This is futile; we've already commenced shutdown and our blocklists have
// been deleted. We may want to look into resurrecting the blocklist instead
// but for now, just don't even go there.
return NS_OK;
}
// Shortcut this logic for TenFourFox: we don't support *anything*
// right now.
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;