gecko-dev/mozglue/baseprofiler
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
..
core Bug 1559000 - Enable/disable mozglue's AutoProfilerLabel when Base Profiler starts/stops - r=mstange 2019-07-04 04:39:08 +00:00
lul Bug 1492121 - Enclosing BaseProfiler in namespace mozilla::baseprofiler - r=njn 2019-06-06 06:20:03 +00:00
public 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 Bug 1565137 - BlocksRingBuffer is a thread-safe variable-sized circular buffer - r=gregtatum 2019-07-16 07:57:24 +00:00