mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-26 17:17:31 +09:00
Bug 1741201 - Increase intermediate byte storage maximum capacity. r=janv, a=tjr
This commit is contained in:
parent
258790bf38
commit
7d7c1ab08a
1 changed files with 9 additions and 5 deletions
|
|
@ -26311,13 +26311,17 @@ ObjectStoreAddOrPutRequestOp::DoDatabaseWork(DatabaseConnection* aConnection)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
nsCString flatCloneData;
|
AutoTArray<char, 4096> flatCloneData; // 4096 from JSStructuredCloneData
|
||||||
flatCloneData.SetLength(cloneDataSize);
|
if (!flatCloneData.SetLength(cloneDataSize, fallible)) {
|
||||||
auto iter = cloneData.Start();
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
cloneData.ReadBytes(iter, flatCloneData.BeginWriting(), cloneDataSize);
|
}
|
||||||
|
{ // iter scope
|
||||||
|
auto iter = cloneData.Start();
|
||||||
|
MOZ_ALWAYS_TRUE(cloneData.ReadBytes(iter, flatCloneData.Elements(), cloneDataSize));
|
||||||
|
}
|
||||||
|
|
||||||
// Compress the bytes before adding into the database.
|
// Compress the bytes before adding into the database.
|
||||||
const char* uncompressed = flatCloneData.BeginReading();
|
const char* uncompressed = flatCloneData.Elements();
|
||||||
size_t uncompressedLength = cloneDataSize;
|
size_t uncompressedLength = cloneDataSize;
|
||||||
|
|
||||||
size_t compressedLength = snappy::MaxCompressedLength(uncompressedLength);
|
size_t compressedLength = snappy::MaxCompressedLength(uncompressedLength);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue