Fix blocker bug 114675 with null check around assertion code that I meant to check in yesterday (bug 114220).

This commit is contained in:
dbaron@fas.harvard.edu
2001-12-11 19:16:15 +00:00
parent 69c6553443
commit 08f74afc9c
2 changed files with 18 additions and 14 deletions

View File

@@ -974,13 +974,15 @@ FrameManager::NotifyDestroyingFrame(nsIFrame* aFrame)
RemoveAllPropertiesFor(presContext, aFrame);
#ifdef DEBUG
nsCOMPtr<nsIContent> content;
aFrame->GetContent(getter_AddRefs(content));
PrimaryFrameMapEntry *entry = NS_STATIC_CAST(PrimaryFrameMapEntry*,
PL_DHashTableOperate(&mPrimaryFrameMap, content, PL_DHASH_LOOKUP));
NS_ASSERTION(!PL_DHASH_ENTRY_IS_BUSY(entry) || entry->frame != aFrame,
"frame was not removed from primary frame map before"
"destruction or was readded to map after being removed");
if (mPrimaryFrameMap.ops) {
nsCOMPtr<nsIContent> content;
aFrame->GetContent(getter_AddRefs(content));
PrimaryFrameMapEntry *entry = NS_STATIC_CAST(PrimaryFrameMapEntry*,
PL_DHashTableOperate(&mPrimaryFrameMap, content, PL_DHASH_LOOKUP));
NS_ASSERTION(!PL_DHASH_ENTRY_IS_BUSY(entry) || entry->frame != aFrame,
"frame was not removed from primary frame map before"
"destruction or was readded to map after being removed");
}
#endif
return NS_OK;