Bug
1890689 Change AudioRingBuffer::SetLengthBytes() to EnsureLengthBytes() r=pehrsons
This now provides reasonable behavior if shorter lengths should be passed.
SetLengthBytes() did not move buffered data to within a shorter new length and
would not update mWriteIndexhandle. TestAudioRingBuffer.EnsureLengthShorter
would crash with
Assertion failure:
aStart <= len && (aLength == dynamic_extent || (aStart + aLength <= len)),
at obj/dist/include/mozilla/Span.h:660
SetLengthBytes() was called with shorter lengths only on memory allocation
failure. This was not necessary.
The warning is adjusted to indicate the size of the allocation attempted.
Depends on
D207659
Differential Revision: https://phabricator.services.mozilla.com/
D207660