mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 968520 - Add mozilla::fallible to FallibleTArray::InsertElementSorted calls. r=froydnj
This commit is contained in:
parent
342ba3d351
commit
0ed055903e
@ -858,7 +858,8 @@ ReadCompressedIndexDataValuesFromBlob(
|
||||
blobDataIter += keyBufferLength;
|
||||
|
||||
if (NS_WARN_IF(!aIndexValues.InsertElementSorted(
|
||||
IndexDataValue(indexId, unique, Key(keyBuffer))))) {
|
||||
IndexDataValue(indexId, unique, Key(keyBuffer)),
|
||||
fallible))) {
|
||||
IDB_REPORT_INTERNAL_ERR();
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
@ -2734,7 +2735,8 @@ InsertIndexDataValuesFunction::OnFunctionCall(mozIStorageValueArray* aValues,
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_TRUE(
|
||||
indexValues.InsertElementSorted(IndexDataValue(indexId, !!unique, value)));
|
||||
indexValues.InsertElementSorted(IndexDataValue(indexId, !!unique, value),
|
||||
fallible));
|
||||
|
||||
// Compress the array.
|
||||
UniqueFreePtr<uint8_t> indexValuesBlob;
|
||||
@ -17856,7 +17858,8 @@ DatabaseOperationBase::IndexDataValuesFromUpdateInfos(
|
||||
MOZ_ALWAYS_TRUE(aUniqueIndexTable.Get(indexId, &unique));
|
||||
|
||||
MOZ_ALWAYS_TRUE(
|
||||
aIndexValues.InsertElementSorted(IndexDataValue(indexId, unique, key)));
|
||||
aIndexValues.InsertElementSorted(IndexDataValue(indexId, unique, key),
|
||||
fallible));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -22291,7 +22294,8 @@ UpdateIndexDataValuesFunction::OnFunctionCall(mozIStorageValueArray* aValues,
|
||||
MOZ_ALWAYS_TRUE(
|
||||
indexValues.InsertElementSorted(IndexDataValue(metadata.id(),
|
||||
metadata.unique(),
|
||||
info.value())));
|
||||
info.value()),
|
||||
fallible));
|
||||
}
|
||||
|
||||
UniqueFreePtr<uint8_t> indexValuesBlob;
|
||||
@ -22327,7 +22331,8 @@ UpdateIndexDataValuesFunction::OnFunctionCall(mozIStorageValueArray* aValues,
|
||||
MOZ_ALWAYS_TRUE(
|
||||
indexValues.InsertElementSorted(IndexDataValue(metadata.id(),
|
||||
metadata.unique(),
|
||||
info.value())));
|
||||
info.value()),
|
||||
fallible));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ ChunkSet::Set(uint32_t aChunk)
|
||||
{
|
||||
size_t idx = mChunks.BinaryIndexOf(aChunk);
|
||||
if (idx == nsTArray<uint32_t>::NoIndex) {
|
||||
if (!mChunks.InsertElementSorted(aChunk)) {
|
||||
if (!mChunks.InsertElementSorted(aChunk, fallible)) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user