Bug 729640 - Fix broken UrlClassifier assertion. r=dcamp
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Thu, 23 Feb 2012 18:00:39 +0100
changeset 87552 f8bf3795b851c71a014d0f6edd24e29f6be28fca
parent 87551 36c73ec83bb384f4ac2e0e563ef5b28b514c53ef
child 87553 1a6d008acb4fb953874dd3d2016514618a502750
push id22130
push userrnewman@mozilla.com
push dateFri, 24 Feb 2012 02:35:54 +0000
treeherdermozilla-central@d23600a1d4a7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdcamp
bugs729640
milestone13.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 729640 - Fix broken UrlClassifier assertion. r=dcamp
toolkit/components/url-classifier/ProtocolParser.cpp
--- a/toolkit/components/url-classifier/ProtocolParser.cpp
+++ b/toolkit/components/url-classifier/ProtocolParser.cpp
@@ -697,22 +697,22 @@ ProtocolParser::ProcessHostAddComplete(P
 
   return NS_OK;
 }
 
 nsresult
 ProtocolParser::ProcessHostSubComplete(PRUint8 aNumEntries,
                                        const nsACString& aChunk, PRUint32* aStart)
 {
-  NS_ASSERTION(mChunkState.hashSize == PREFIX_SIZE,
-               "ProcessHostSub should only be called for prefix hashes.");
+  NS_ASSERTION(mChunkState.hashSize == COMPLETE_SIZE,
+               "ProcessHostSubComplete should only be called for complete hashes.");
 
   if (aNumEntries == 0) {
     // this is totally comprehensible.
-    NS_WARNING("Expected > 0 entries for a 32-byte hash add.");
+    NS_WARNING("Expected > 0 entries for a 32-byte hash sub.");
     return NS_OK;
   }
 
   if (*aStart + ((COMPLETE_SIZE + 4) * aNumEntries) > aChunk.Length()) {
     NS_WARNING("Chunk is not long enough to contain the expected entries.");
     return NS_ERROR_FAILURE;
   }