зеркало из https://github.com/mozilla/gecko-dev.git
Bug 714453: Make pldhash assertions fatal. r=dbaron
This commit is contained in:
Родитель
cd8124620e
Коммит
1489f79285
|
@ -63,7 +63,7 @@
|
|||
#define DECREMENT_RECURSION_LEVEL(table_) \
|
||||
PR_BEGIN_MACRO \
|
||||
if (RECURSION_LEVEL(table_) != IMMUTABLE_RECURSION_LEVEL) { \
|
||||
NS_ASSERTION(RECURSION_LEVEL(table_) > 0, "RECURSION_LEVEL(table_) > 0"); \
|
||||
MOZ_ASSERT(RECURSION_LEVEL(table_) > 0); \
|
||||
--RECURSION_LEVEL(table_); \
|
||||
} \
|
||||
PR_END_MACRO
|
||||
|
@ -365,8 +365,7 @@ PL_DHashTableFinish(PLDHashTable *table)
|
|||
}
|
||||
|
||||
DECREMENT_RECURSION_LEVEL(table);
|
||||
NS_ASSERTION(RECURSION_LEVEL_SAFE_TO_FINISH(table),
|
||||
"RECURSION_LEVEL_SAFE_TO_FINISH(table)");
|
||||
MOZ_ASSERT(RECURSION_LEVEL_SAFE_TO_FINISH(table));
|
||||
|
||||
/* Free entry storage last. */
|
||||
table->ops->freeTable(table, table->entryStore);
|
||||
|
@ -571,8 +570,7 @@ PL_DHashTableOperate(PLDHashTable *table, const void *key, PLDHashOperator op)
|
|||
uint32_t size;
|
||||
int deltaLog2;
|
||||
|
||||
NS_ASSERTION(op == PL_DHASH_LOOKUP || RECURSION_LEVEL(table) == 0,
|
||||
"op == PL_DHASH_LOOKUP || RECURSION_LEVEL(table) == 0");
|
||||
MOZ_ASSERT(op == PL_DHASH_LOOKUP || RECURSION_LEVEL(table) == 0);
|
||||
INCREMENT_RECURSION_LEVEL(table);
|
||||
|
||||
keyHash = table->ops->hashKey(table, key);
|
||||
|
@ -677,8 +675,7 @@ PL_DHashTableRawRemove(PLDHashTable *table, PLDHashEntryHdr *entry)
|
|||
{
|
||||
PLDHashNumber keyHash; /* load first in case clearEntry goofs it */
|
||||
|
||||
NS_ASSERTION(RECURSION_LEVEL(table) != IMMUTABLE_RECURSION_LEVEL,
|
||||
"RECURSION_LEVEL(table) != IMMUTABLE_RECURSION_LEVEL");
|
||||
MOZ_ASSERT(RECURSION_LEVEL(table) != IMMUTABLE_RECURSION_LEVEL);
|
||||
|
||||
NS_ASSERTION(PL_DHASH_ENTRY_IS_LIVE(entry),
|
||||
"PL_DHASH_ENTRY_IS_LIVE(entry)");
|
||||
|
@ -726,8 +723,7 @@ PL_DHashTableEnumerate(PLDHashTable *table, PLDHashEnumerator etor, void *arg)
|
|||
entryAddr += entrySize;
|
||||
}
|
||||
|
||||
NS_ASSERTION(!didRemove || RECURSION_LEVEL(table) == 1,
|
||||
"!didRemove || RECURSION_LEVEL(table) == 1");
|
||||
MOZ_ASSERT(!didRemove || RECURSION_LEVEL(table) == 1);
|
||||
|
||||
/*
|
||||
* Shrink or compress if a quarter or more of all entries are removed, or
|
||||
|
|
Загрузка…
Ссылка в новой задаче