• Jeremy Roman's avatar
    Make the request and response validator stubs short tail calls with a lookup table. · 45dfa799
    Jeremy Roman authored
    This saves about 90 kB of Android APK size, and should be nearly as fast. This
    adds up mainly because we have a sufficient number of Mojo methods that this
    code is very heavily repeated.
    
    For example, network::mojom::NetworkContextRequestValidator::Accept (1,592 bytes)
    is replaced with a 24-byte function and a 720-byte table, and the strings
    "NetworkContext RequestValidator" and "NetworkContext ResponseValidator" are
    replaced with a single "NetworkContext" that may even be further deduped.
    
    Change-Id: I772145a839b9607098311b3309fd49e94e43991e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1896773
    Commit-Queue: Jeremy Roman <jbroman@chromium.org>
    Reviewed-by: default avatarKen Rockot <rockot@google.com>
    Auto-Submit: Jeremy Roman <jbroman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#713576}
    45dfa799
mojom.gni 52.8 KB