mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 968520 - Explicitly use infallible allocator for ShiftData call in nsTArray::RemoveElementsAt. r=froydnj
This call will never fail so this merely makes the intent clear.
This commit is contained in:
parent
937f1db60f
commit
a283d58dc4
@ -793,6 +793,7 @@ class nsTArray_Impl
|
||||
{
|
||||
private:
|
||||
typedef nsTArrayFallibleAllocator FallibleAlloc;
|
||||
typedef nsTArrayInfallibleAllocator InfallibleAlloc;
|
||||
|
||||
public:
|
||||
typedef typename nsTArray_CopyChooser<E>::Type copy_type;
|
||||
@ -1649,8 +1650,9 @@ public:
|
||||
// Check that the previous assert didn't overflow
|
||||
MOZ_ASSERT(aStart <= aStart + aCount, "Start index plus length overflows");
|
||||
DestructRange(aStart, aCount);
|
||||
this->template ShiftData<Alloc>(aStart, aCount, 0,
|
||||
sizeof(elem_type), MOZ_ALIGNOF(elem_type));
|
||||
this->template ShiftData<InfallibleAlloc>(aStart, aCount, 0,
|
||||
sizeof(elem_type),
|
||||
MOZ_ALIGNOF(elem_type));
|
||||
}
|
||||
|
||||
// A variation on the RemoveElementsAt method defined above.
|
||||
|
Loading…
Reference in New Issue
Block a user