Skip to content
Snippets Groups Projects
Commit 6fc92bac authored by Kash Shampur's avatar Kash Shampur Committed by Pier Angelo Vendrame
Browse files

Bug 1803109 - Discard blocks of data that are too big for two chunks. r=canaltinova

Currently, `ReserveAndPutRaw` allocates a second span even if the data would be too big for the chunk.
Here a second conditional is added to check if the block of data is too big in this scenario and silently discard the data if so.

Differential Revision: https://phabricator.services.mozilla.com/D167167
parent c784f244
No related branches found
No related tags found
1 merge request!735Bug 42033: Rebased release onto 102.15.0esr (last 102.x release!)
......@@ -1088,6 +1088,12 @@ class ProfileChunkedBuffer {
MOZ_ASSERT(maybeEntryWriter->RemainingBytes() == blockBytes);
mRangeEnd += blockBytes;
mPushedBlockCount += aBlockCount;
} else if (blockBytes >= current->BufferBytes()) {
// Currently only two buffer chunks are held at a time and it is not
// possible to write an object that takes up more space than this. In
// this scenario, silently discard this block of data if it is unable
// to fit into the two reserved profiler chunks.
mFailedPutBytes += blockBytes;
} else {
// Block doesn't fit fully in current chunk, it needs to overflow into
// the next one.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment