mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1135532: Allow partial truncation from ResourceQueue. r=cajbir
This commit is contained in:
parent
26d3ba6fc1
commit
ca5abc580a
@ -123,6 +123,16 @@ public:
|
||||
SBR_DEBUG("item=%p length=%d offset=%llu",
|
||||
item, item->mData->Length(), mOffset);
|
||||
if (item->mData->Length() + mOffset >= aOffset) {
|
||||
if (aOffset <= mOffset) {
|
||||
break;
|
||||
}
|
||||
uint32_t offset = aOffset - mOffset;
|
||||
mOffset += offset;
|
||||
evicted += offset;
|
||||
nsRefPtr<LargeDataBuffer> data = new LargeDataBuffer;
|
||||
data->AppendElements(item->mData->Elements() + offset,
|
||||
item->mData->Length() - offset);
|
||||
item->mData = data;
|
||||
break;
|
||||
}
|
||||
mOffset += item->mData->Length();
|
||||
|
Loading…
Reference in New Issue
Block a user