Commit Graph
4 Commits
Author SHA1 Message Date
Eric Rahm c6756f1edb Bug 1380154 - Part 1: Add the Chromium DAFSA generator. r=njn
This imports Chromium's `make_dafsa.py` script [1]. It takes in a gperf
formatted file (note: gperf is *not* required) and converts that to a compact
binary representation of the string data in the form of a deterministic
acyclic finite state automaton (DAFSA) [2].

The only change made to the script was to make it handle the arguments our
file generation script passes in to the `main` function.

It also imports the logic for traversing the DAFSA [3] almost verbatim in
`Dafsa.cpp`. A thin wrapper was added so that we can reuse the DAFSA structure
for multiple tables.

The only change made to the original logic was to swap in mozilla style
assertions and rename the not found constant from `kNotFound` to
`Dafsa::kKeyNotFound` in order to avoid a collision with `kNotFound` defined in
our nsString code.

[1] https://chromium.googlesource.com/chromium/src/net/+/6ba04a90565e236b5a420c3a5039718183ad35bd/tools/dafsa/make_dafsa.py
[2] https://en.wikipedia.org/wiki/Deterministic_acyclic_finite_state_automaton
[3] https://chromium.googlesource.com/chromium/chromium/+/a2a90a35aa5b7178e219668bde5889595c710451/net/base/registry_controlled_domains/registry_controlled_domain.cc#72

MozReview-Commit-ID: Eion9POHZm5
2017-07-17 16:09:42 -07:00
Sylvestre Ledru 576cac5ec7 Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL
2017-07-15 19:03:04 +02:00
Michelangelo De Simone 3ca0060291 Bug 1317451 - ASSERT_DEATH replaced by ASSERT_DEATH_IF_SUPPORTED. r=froydnj
MozReview-Commit-ID: Auqwd0NlM17
2016-11-13 11:12:49 -08:00
Eric Rahm 7a4d36907b Bug 1316437 - Convert TestSTLWrappers to a gtest. r=bsmedberg
MozReview-Commit-ID: HRmnWvxyNP
2016-11-10 13:04:06 -08:00