32 mLock = nsAutoLock::NewLock(
"sbLocalDatabaseGUIDArrayLengthCache");
40 nsAutoLock::DestroyLock(
mLock);
44 sbLocalDatabaseGUIDArrayLengthCache::AddCachedLength(
const nsAString &aKey,
47 nsAutoLock lock(
mLock);
49 NS_ENSURE_TRUE(
mCachedLengths.Put(aKey, aLength), NS_ERROR_OUT_OF_MEMORY);
55 sbLocalDatabaseGUIDArrayLengthCache::GetCachedLength(
const nsAString &aKey,
58 NS_ENSURE_ARG_POINTER(aLength);
62 nsAutoLock lock(
mLock);
65 return NS_ERROR_NOT_AVAILABLE;
70 sbLocalDatabaseGUIDArrayLengthCache::RemoveCachedLength(
const nsAString &aKey)
72 nsAutoLock lock(
mLock);
81 sbLocalDatabaseGUIDArrayLengthCache::AddCachedNonNullLength(
82 const nsAString &aKey,
85 nsAutoLock lock(
mLock);
88 NS_ERROR_OUT_OF_MEMORY);
94 sbLocalDatabaseGUIDArrayLengthCache::GetCachedNonNullLength(
95 const nsAString &aKey,
98 NS_ENSURE_ARG_POINTER(aLength);
102 nsAutoLock lock(
mLock);
105 return NS_ERROR_NOT_AVAILABLE;
110 sbLocalDatabaseGUIDArrayLengthCache::RemoveCachedNonNullLength(
111 const nsAString &aKey)
113 nsAutoLock lock(
mLock);
virtual ~sbLocalDatabaseGUIDArrayLengthCache()
nsDataHashtable< nsStringHashKey, PRUint32 > mCachedLengths
NS_DECL_ISUPPORTS NS_DECL_SBILOCALDATABASEGUIDARRAYLENGTHCACHE sbLocalDatabaseGUIDArrayLengthCache()
nsDataHashtable< nsStringHashKey, PRUint32 > mCachedNonNullLengths
[USER CODE SHOULD NOT REFERENCE THIS CLASS]
NS_IMPL_THREADSAFE_ISUPPORTS1(sbLocalDatabaseGUIDArrayLengthCache, sbILocalDatabaseGUIDArrayLengthCache)