fune/toolkit/components/url-classifier
Francois Marier 3aa5d0aeda Bug 1362761 - Make WritePrefixes() more readable. r=dimi
Add assertions to highlight what the various data structures
should look like.

Also assert to ensure that mIndexPrefixes is always the same
length as mIndexDeltas and avoid writing the prefixes to disk
if that's not the case.

Do a single fallible allocation before we create the indexStarts
array instead of checking on each AppendElement() to simplify
the loop and emphasize the number of elements that the array
will receive (indexSize + 1). Remove the last element since we
don't actually end up writing it to disk.

MozReview-Commit-ID: HIg7ZmgaL7x

Differential Revision: https://phabricator.services.mozilla.com/D2063

--HG--
extra : moz-landing-system : lando
2018-07-11 09:10:31 +00:00
..
chromium
docs
tests Bug 1362761 - Force file and streams to use smart pointers. r=dimi 2018-07-12 22:19:40 +00:00
ChunkSet.cpp Bug 1362761 - Make prefix and chunk sets as const as possible. r=dimi 2018-07-11 12:52:37 +00:00
ChunkSet.h Bug 1362761 - Make prefix and chunk sets as const as possible. r=dimi 2018-07-11 12:52:37 +00:00
Classifier.cpp Bug 1467581 - Do less work in Reset() if Close() has been called. r=gcp 2018-06-07 17:45:46 -07:00
Classifier.h Bug 1467581 - Do less work in Reset() if Close() has been called. r=gcp 2018-06-07 17:45:46 -07:00
Entries.h
HashStore.cpp Bug 1434206 - Keep TableUpdate objects in smart pointers. r=gcp 2018-06-01 15:48:48 -07:00
HashStore.h Bug 1434206 - Keep TableUpdate objects in smart pointers. r=gcp 2018-06-01 15:48:48 -07:00
IUrlClassifierUITelemetry.idl
LookupCache.cpp Bug 1362761 - Force file and streams to use smart pointers. r=dimi 2018-07-12 22:19:40 +00:00
LookupCache.h Bug 1362761 - Force file and streams to use smart pointers. r=dimi 2018-07-12 22:19:40 +00:00
LookupCacheV4.cpp Bug 1362761 - Force file and streams to use smart pointers. r=dimi 2018-07-12 22:19:40 +00:00
LookupCacheV4.h Bug 1362761 - Force file and streams to use smart pointers. r=dimi 2018-07-12 22:19:40 +00:00
moz.build
nsCheckSummedOutputStream.cpp
nsCheckSummedOutputStream.h
nsIUrlClassifierDBService.idl Bug 1434206 - Keep LookupResult objects in smart pointers. r=gcp 2018-06-05 13:15:03 -07:00
nsIUrlClassifierHashCompleter.idl
nsIUrlClassifierInfo.idl
nsIUrlClassifierPrefixSet.idl
nsIUrlClassifierStreamUpdater.idl
nsIUrlClassifierUtils.idl
nsIUrlListManager.idl
nsURLClassifier.manifest
nsUrlClassifierDBService.cpp Bug 1469412 - Convert nsIUrlClassifierCacheInfo* objects to smart pointers. r=francois 2018-07-10 17:12:42 +00:00
nsUrlClassifierDBService.h Bug 1467581 - Replace all nsAutoPtrs with UniquePtrs in Safe Browsing code. r=gcp 2018-06-18 13:54:59 -07:00
nsUrlClassifierHashCompleter.js Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
nsUrlClassifierInfo.cpp
nsUrlClassifierInfo.h
nsUrlClassifierLib.js Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
nsUrlClassifierListManager.js Bug 1460092: Add ESLint rule to enforce use of ChromeUtils.generateQI. r=Gijs 2018-05-08 18:36:22 -07:00
nsUrlClassifierPrefixSet.cpp Bug 1362761 - Make WritePrefixes() more readable. r=dimi 2018-07-11 09:10:31 +00:00
nsUrlClassifierPrefixSet.h Bug 1362761 - Safer Clean() and IsEmpty() handling in PrefixSet. r=dimi 2018-07-11 12:40:34 +00:00
nsUrlClassifierProxies.cpp Bug 1469412 - Convert nsIUrlClassifierCacheInfo* objects to smart pointers. r=francois 2018-07-10 17:12:42 +00:00
nsUrlClassifierProxies.h Bug 1469412 - Convert nsIUrlClassifierCacheInfo* objects to smart pointers. r=francois 2018-07-10 17:12:42 +00:00
nsUrlClassifierStreamUpdater.cpp
nsUrlClassifierStreamUpdater.h
nsUrlClassifierUtils.cpp
nsUrlClassifierUtils.h Bug 1467581 - Replace all nsAutoPtrs with UniquePtrs in Safe Browsing code. r=gcp 2018-06-18 13:54:59 -07:00
ProtocolParser.cpp Bug 1434206 - Keep TableUpdate objects in smart pointers. r=gcp 2018-06-01 15:48:48 -07:00
ProtocolParser.h Bug 1434206 - Keep TableUpdate objects in smart pointers. r=gcp 2018-06-01 15:48:48 -07:00
RiceDeltaDecoder.cpp
RiceDeltaDecoder.h
SafeBrowsing.jsm
UrlClassifierTelemetryUtils.cpp
UrlClassifierTelemetryUtils.h
VariableLengthPrefixSet.cpp Bug 1362761 - Safer Clean() and IsEmpty() handling in PrefixSet. r=dimi 2018-07-11 12:40:34 +00:00
VariableLengthPrefixSet.h Bug 1362761 - Force file and streams to use smart pointers. r=dimi 2018-07-12 22:19:40 +00:00