Use uint64_t for varint.

gfe-relnote: Change two types from uint32_t to uint64_t.  Not flag protected.

Motivation: https://crbug.com/916990.

HpackVarintDecoder::value() has a return type of uint64_t.  This was returned by
HpackEntryTypeDecoder::varint() as a uint32_t, this CL changes that to uint64_t.
Outside tests HpackEntryTypeDecoder::varint() is called in
HpackEntryDecoder::Start(), where it is immediately passed to
HpackEntryDecoderListener::OnIndexedHeader(), which takes a size_t.

The other HpackEntryTypeDecoder::varint() production call site is
HpackEntryDecoder::DispatchOnType(), where a local variable |varint| is assigned
to its return value.  This CL changes |varint| type from uint32_t to uint64_t.
It is then passed to three methods:
HpackEntryDecoderListener::OnIndexedHeader(),
HpackEntryDecoderListener::OnStartLiteralHeader(), and
HpackEntryDecoderListener::OnDynamicTableSizeUpdate().  These all take size_t.

Every platform that GFE cares about has a 64 bit wide size_t.  So all this CL
does is remove a 64 bit to 32 bit to 64 bit integer conversion along a small
number of paths.

PiperOrigin-RevId: 226346424
Change-Id: I71f50f71e6d1702845b3e76a7427428c28aa6984
2 files changed
tree: 5c5543af3c70ce2177d71ee421b6c209a3fb07cd
  1. http2/
  2. CONTRIBUTING.md
  3. LICENSE
  4. README.md
README.md

QUICHE

QUICHE (QUIC, Http/2, Etc) is Google‘s implementation of QUIC and related protocols. It powers Chromium as well as Google’s QUIC servers and some other projects.

The code is currently in process of being moved from https://cs.chromium.org/chromium/src/net/third_party/ into this repository. Please excuse our appearance while we're under construction.