Bug 547811 - ASSERTION: Children are stored but not initialized! 'mAreChildrenInitialized', file c:/mozilla/fx20-02/accessible/src/base/nsAccessible.cpp, line 3011, r=davidb

This commit is contained in:
Alexander Surkov 2010-03-09 15:25:24 +08:00
parent ef9946d39a
commit f86f7e79fd
2 changed files with 5 additions and 9 deletions

View File

@ -3000,20 +3000,15 @@ void
nsAccessible::TestChildCache(nsAccessible *aCachedChild)
{
#ifdef DEBUG
// All cached accessible nodes should be in the parent
// It will assert if not all the children were created
// when they were first cached, and no invalidation
// ever corrected parent accessible's child cache.
PRUint32 childCount = mChildren.Length();
if (childCount == 0) {
NS_ASSERTION(mAreChildrenInitialized,
"Children are stored but not initialized!");
NS_ASSERTION(!mAreChildrenInitialized, "No children but initialized!");
return;
}
nsAccessible *child;
nsAccessible *child = nsnull;
for (PRInt32 childIdx = 0; childIdx < childCount; childIdx++) {
child = GetChildAt(childIdx);
child = mChildren[childIdx];
if (child == aCachedChild)
break;
}

View File

@ -302,7 +302,8 @@ public:
PRUint32 aLength);
/**
* Assert if child not in parent's cache.
* Assert if child not in parent's cache if the cache was initialized at this
* point.
*/
void TestChildCache(nsAccessible *aCachedChild);