зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1628715 - Part 3: Make fallible nsTArray::Assign nodiscard. r=xpcom-reviewers,erahm
Differential Revision: https://phabricator.services.mozilla.com/D70384
This commit is contained in:
Родитель
3ff0c697d3
Коммит
93004ea958
|
@ -44,7 +44,7 @@ TEST(PrioEncoder, BooleanLimitExceeded)
|
|||
*(sequence.AppendElement(mozilla::fallible)) = rand() % 2;
|
||||
}
|
||||
|
||||
prioParams.mBooleans.Assign(sequence);
|
||||
ASSERT_TRUE(prioParams.mBooleans.Assign(sequence));
|
||||
|
||||
mozilla::dom::RootedDictionary<mozilla::dom::PrioEncodedData> prioEncodedData(
|
||||
cx);
|
||||
|
@ -183,7 +183,7 @@ TEST(PrioEncoder, VerifyFull)
|
|||
*(sequence.AppendElement(mozilla::fallible)) = dataItems[0];
|
||||
*(sequence.AppendElement(mozilla::fallible)) = dataItems[1];
|
||||
*(sequence.AppendElement(mozilla::fallible)) = dataItems[2];
|
||||
prioParams.mBooleans.Assign(sequence);
|
||||
ASSERT_TRUE(prioParams.mBooleans.Assign(sequence));
|
||||
|
||||
mozilla::dom::RootedDictionary<mozilla::dom::PrioEncodedData> prioEncodedData(
|
||||
cx);
|
||||
|
|
|
@ -1467,7 +1467,7 @@ class nsTArray_Impl
|
|||
//
|
||||
|
||||
template <class Allocator, typename ActualAlloc = Alloc>
|
||||
typename ActualAlloc::ResultType Assign(
|
||||
[[nodiscard]] typename ActualAlloc::ResultType Assign(
|
||||
const nsTArray_Impl<E, Allocator>& aOther) {
|
||||
return ActualAlloc::ConvertBoolToResultType(
|
||||
!!ReplaceElementsAt<E, ActualAlloc>(0, Length(), aOther.Elements(),
|
||||
|
|
Загрузка…
Ссылка в новой задаче