Bug 998097 - Make DeviceStorageUsedSpaceCache use a thread-safe ref count. r=ehsan

DeviceStorageUsedSpaceCache uses the LazyIdleThread, and the underlying OS
thread can change from time to time, which in turn triggers a not thread safe
assert in the reference counting code.
This commit is contained in:
Dave Hylands 2014-04-22 18:31:04 -07:00
parent e2b8a2d6b0
commit de3fc83b1d

View File

@ -121,7 +121,10 @@ private:
struct CacheEntry
{
NS_INLINE_DECL_REFCOUNTING(DeviceStorageUsedSpaceCache::CacheEntry)
// Technically, this doesn't need to be threadsafe, but the implementation
// of the non-thread safe one causes ASSERTS due to the underlying thread
// associated with a LazyIdleThread changing from time to time.
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DeviceStorageUsedSpaceCache::CacheEntry)
bool mDirty;
nsString mStorageName;