gecko-dev/netwerk/test/gtest
Kris Maglione 27975ea3b6 Bug 1478124: Part 4b - Support loading components from static lookup tables. r=froydnj
This patch essentially creates a separate, static component database for
statically-defined CID and contract ID entries, and gives it precedence over
the runtime DB. It combines the two separate databases by updating existing
code to use lookup functions which understand both databases, and then access
all entries through wrappers which defer to the appropriate underlying type.

Static component entries require no runtime relocations, and require no
writable data allocation aside from one pointer-sized BSS entry per CID, and
one bit of BSS per contract ID.

To achieve this, all strings in the static lookup tables are stored as indexes
into a static string table, all constructor functions live in a switch
statement which compiles to a relative jump table, and all writable data for
static entries is accessed by indexed lookups into BSS arrays.

We also avoid creating nsIFactory entries for static components when possible
by adding a CreateInstance method to nsFactoryEntry and the corresponding
entry wrapper to directly call the appropriate constructor method, and only
create a factory object when required by external code.

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

--HG--
extra : rebase_source : 903a6f31c6290d0090e6765e0e317d1f749c5855
extra : source : b8d2dfdfc324c53ce5aacc822ce52d4e2bfdc31a
2018-12-18 20:30:13 -08:00
..
parse-ftp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
moz.build Bug 1478124: Part 4b - Support loading components from static lookup tables. r=froydnj 2018-12-18 20:30:13 -08:00
TestBufferedInputStream.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TestHeaders.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TestHttpAuthUtils.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TestIsValidIp.cpp Bug 1481014 - WIP - Rewrite net_IsValidIPv4Addr in rust. r=valentin,froydnj 2018-12-13 12:07:26 +00:00
TestMIMEInputStream.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TestMozURL.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TestPACMan.cpp Bug 1478124: Part 4b - Support loading components from static lookup tables. r=froydnj 2018-12-18 20:30:13 -08:00
TestPartiallySeekableInputStream.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TestProtocolProxyService.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TestReadStreamToString.cpp Bug 1437152 - NS_ReadInputStreamToString doesn't reallocate the string if the size is passed, r=froydnj 2018-02-12 17:40:17 +01:00
TestServerTimingHeader.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TestStandardURL.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TestURIMutator.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00