Bug 1434206 - Don't cache gethash response if we failed to apply results. r?gcp draft
authorFrancois Marier <francois@mozilla.com>
Fri, 11 May 2018 10:57:11 -0700
changeset 467864 e194843f5b7a
parent 467863 2d1bf04fd155
child 467865 47906774d58d
push id180
push userfmarier@mozilla.com
push dateTue, 29 May 2018 01:16:16 +0000
reviewersgcp
bugs1434206
milestone62.0a1
Bug 1434206 - Don't cache gethash response if we failed to apply results. r?gcp MozReview-Commit-ID: APJ1qhofU3t
toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
@@ -899,17 +899,18 @@ nsUrlClassifierDBServiceWorker::CacheCom
       updates.AppendElement(tu);
       pParse->ForgetTableUpdates();
     } else {
       LOG(("Completion received, but table %s is not active, so not caching.",
            result->table.get()));
     }
    }
 
-  mClassifier->ApplyFullHashes(&updates);
+  rv = mClassifier->ApplyFullHashes(&updates);
+  NS_ENSURE_SUCCESS(rv, rv);
   mLastResults = Move(resultsPtr);
   return NS_OK;
 }
 
 nsresult
 nsUrlClassifierDBServiceWorker::CacheResultToTableUpdate(CacheResult* aCacheResult,
                                                          TableUpdate* aUpdate)
 {