gecko-dev/mozglue
Gerald Squelart f5ca1ba02d Bug 1567465 - Default BlockIndex used as empty value index before any valid entry - r=gregtatum
This is a similar concept as `nullptr` is to a pointer.

`BlocksRingBuffer` now skips the first byte in the buffer, so that no entries
start at 0 (the internal default `BlockIndex` value).
All `BlocksRingBuffer` public APIs handle this default value, and do nothing
and/or return Nothing (as if it pointed at an already-deleted entry).

Added tests for this, and for all BlockIndex operations.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 16:10:30 +00:00
..
android
baseprofiler Bug 1567465 - Default BlockIndex used as empty value index before any valid entry - r=gregtatum 2019-07-19 16:10:30 +00:00
build
linker
misc
tests Bug 1567465 - Default BlockIndex used as empty value index before any valid entry - r=gregtatum 2019-07-19 16:10:30 +00:00
moz.build