mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 353021, crashes [@ PL_DHashTableOperate] removing from nsDOMClassInfo's sExternallyReferencedTable, r+sr=dbaron
This commit is contained in:
parent
44067db0cb
commit
dc30e99cc1
@ -5422,8 +5422,19 @@ nsDOMClassInfo::UnsetExternallyReferenced(nsIDOMGCParticipant *aParticipant)
|
||||
{
|
||||
NS_PRECONDITION(aParticipant, "unexpected null pointer");
|
||||
|
||||
PL_DHashTableOperate(&sExternallyReferencedTable, aParticipant,
|
||||
PL_DHASH_REMOVE);
|
||||
NS_ASSERTION(sExternallyReferencedTable.ops,
|
||||
"Unexpected null sExternallyReferencedTable.ops");
|
||||
if (sExternallyReferencedTable.ops) {
|
||||
#ifdef DEBUG
|
||||
PRUint32 count = sExternallyReferencedTable.entryCount;
|
||||
#endif
|
||||
PL_DHashTableOperate(&sExternallyReferencedTable, aParticipant,
|
||||
PL_DHASH_REMOVE);
|
||||
#ifdef DEBUG
|
||||
NS_ASSERTION(count != sExternallyReferencedTable.entryCount,
|
||||
"DOMGCParticipant wasn't removed from sExternallyReferencedTable.");
|
||||
#endif
|
||||
}
|
||||
|
||||
// Don't destroy the table when the entryCount hits zero, since that
|
||||
// is expected to happen often. Instead, destroy it at shutdown.
|
||||
|
Loading…
Reference in New Issue
Block a user