summaryrefslogtreecommitdiffstats
path: root/widget/GfxInfoBase.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-18 08:24:24 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-18 08:24:24 +0200
commitfc61780b35af913801d72086456f493f63197da6 (patch)
treef85891288a7bd988da9f0f15ae64e5c63f00d493 /widget/GfxInfoBase.cpp
parent69f7f9e5f1475891ce11cc4f431692f965b0cd30 (diff)
parent50d3e596bbe89c95615f96eb71f6bc5be737a1db (diff)
downloadUXP-2018.07.18.tar
UXP-2018.07.18.tar.gz
UXP-2018.07.18.tar.lz
UXP-2018.07.18.tar.xz
UXP-2018.07.18.zip
Merge commit '50d3e596bbe89c95615f96eb71f6bc5be737a1db' into Basilisk-releasev2018.07.18
# Conflicts: # browser/app/profile/firefox.js # browser/components/preferences/jar.mn
Diffstat (limited to 'widget/GfxInfoBase.cpp')
-rw-r--r--widget/GfxInfoBase.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/widget/GfxInfoBase.cpp b/widget/GfxInfoBase.cpp
index c937f5099..e20de8277 100644
--- a/widget/GfxInfoBase.cpp
+++ b/widget/GfxInfoBase.cpp
@@ -43,6 +43,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
@@ -62,11 +63,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;
}
@@ -849,6 +856,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;
+ }
+
// If an operating system was provided by the derived GetFeatureStatusImpl,
// grab it here. Otherwise, the OS is unknown.
OperatingSystem os = (aOS ? *aOS : OperatingSystem::Unknown);