Bug 992670 - Fix always true assertion condition in nsNavHistoryResult.cpp. r=mak
☠☠ backed out by c60b059c47ca ☠ ☠
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Wed, 16 Apr 2014 13:56:51 -0400
changeset 198393 7e31deb02ba88d389eae04f5a528d0696e22c714
parent 198392 0d8ac5b08dd5b4508a596fae8fcbad4cfdb14ea6
child 198394 e128ceec086cf203af55501ac688534c1c9610f8
push id486
push userasasaki@mozilla.com
push dateMon, 14 Jul 2014 18:39:42 +0000
treeherdermozilla-release@d33428174ff1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs992670
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 992670 - Fix always true assertion condition in nsNavHistoryResult.cpp. r=mak
toolkit/components/places/nsNavHistoryResult.cpp
--- a/toolkit/components/places/nsNavHistoryResult.cpp
+++ b/toolkit/components/places/nsNavHistoryResult.cpp
@@ -1450,19 +1450,20 @@ nsNavHistoryContainerResultNode::RemoveC
   NS_ASSERTION(aIndex >= 0 && aIndex < mChildren.Count(), "Invalid index");
 
   // Hold an owning reference to keep from expiring while we work with it.
   nsRefPtr<nsNavHistoryResultNode> oldNode = mChildren[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.
   mChildren.RemoveObjectAt(aIndex);
   if (AreChildrenVisible()) {
     nsNavHistoryResult* result = GetResult();
     NOTIFY_RESULT_OBSERVERS(result,
                             NodeRemoved(this, oldNode, aIndex));