Bug 1417806 - Add a comment about gCacheData. r=glandium
MozReview-Commit-ID: 1oVYUMtobRF
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -3151,16 +3151,20 @@ struct CacheData
uint32_t mDefaultValueUint;
float mDefaultValueFloat;
};
};
// gCacheDataDesc holds information about prefs startup. It's being used for
// diagnosing prefs startup problems in bug 1276488.
static const char* gCacheDataDesc = "untouched";
+
+// gCacheData holds the CacheData objects used for VarCache prefs. It owns
+// those objects, and also is used to detect if multiple VarCaches get tied to
+// a single global variable.
static nsTArray<nsAutoPtr<CacheData>>* gCacheData = nullptr;
#ifdef DEBUG
static bool
HaveExistingCacheFor(void* aPtr)
{
MOZ_ASSERT(NS_IsMainThread());
if (gCacheData) {