Bug 992670 - Fix always true assertion condition in nsNavHistoryResult.cpp. r=mak

This commit is contained in:
Birunthan Mohanathas 2014-04-16 13:56:51 -04:00
parent 93e818d617
commit 7b8a4fad4b

View File

@ -1455,9 +1455,10 @@ nsNavHistoryContainerResultNode::RemoveChildAt(int32_t aIndex,
// Update stats.
uint32_t oldAccessCount = 0;
if (!aIsTemporary) {
MOZ_ASSERT(mAccessCount >= mChildren[aIndex]->mAccessCount,
"Invalid access count while updating!");
oldAccessCount = mAccessCount;
mAccessCount -= mChildren[aIndex]->mAccessCount;
NS_ASSERTION(mAccessCount >= 0, "Invalid access count while updating!");
}
// Remove it from our list and notify the result's observers.