зеркало из https://github.com/mozilla/gecko-dev.git
Bug 968520 - Add mozilla::fallible to FallibleTArray::InsertElementAt calls. r=froydnj
This commit is contained in:
Родитель
6898a39a46
Коммит
fcc4ac1672
|
@ -266,7 +266,7 @@ DOMSVGLengthList::InsertItemBefore(DOMSVGLength& newItem,
|
|||
MaybeInsertNullInAnimValListAt(index);
|
||||
|
||||
InternalList().InsertItem(index, domItem->ToSVGLength());
|
||||
MOZ_ALWAYS_TRUE(mItems.InsertElementAt(index, domItem.get()));
|
||||
MOZ_ALWAYS_TRUE(mItems.InsertElementAt(index, domItem.get(), fallible));
|
||||
|
||||
// This MUST come after the insertion into InternalList(), or else under the
|
||||
// insertion into InternalList() the values read from domItem would be bad
|
||||
|
@ -380,7 +380,7 @@ DOMSVGLengthList::MaybeInsertNullInAnimValListAt(uint32_t aIndex)
|
|||
MOZ_ASSERT(animVal->mItems.Length() == mItems.Length(),
|
||||
"animVal list not in sync!");
|
||||
|
||||
MOZ_ALWAYS_TRUE(animVal->mItems.InsertElementAt(aIndex, nullptr));
|
||||
MOZ_ALWAYS_TRUE(animVal->mItems.InsertElementAt(aIndex, nullptr, fallible));
|
||||
|
||||
UpdateListIndicesFromIndex(animVal->mItems, aIndex + 1);
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ DOMSVGNumberList::InsertItemBefore(DOMSVGNumber& aItem,
|
|||
MaybeInsertNullInAnimValListAt(index);
|
||||
|
||||
InternalList().InsertItem(index, domItem->ToSVGNumber());
|
||||
MOZ_ALWAYS_TRUE(mItems.InsertElementAt(index, domItem));
|
||||
MOZ_ALWAYS_TRUE(mItems.InsertElementAt(index, domItem, fallible));
|
||||
|
||||
// This MUST come after the insertion into InternalList(), or else under the
|
||||
// insertion into InternalList() the values read from domItem would be bad
|
||||
|
@ -359,7 +359,7 @@ DOMSVGNumberList::MaybeInsertNullInAnimValListAt(uint32_t aIndex)
|
|||
MOZ_ASSERT(animVal->mItems.Length() == mItems.Length(),
|
||||
"animVal list not in sync!");
|
||||
|
||||
MOZ_ALWAYS_TRUE(animVal->mItems.InsertElementAt(aIndex, nullptr));
|
||||
MOZ_ALWAYS_TRUE(animVal->mItems.InsertElementAt(aIndex, nullptr, fallible));
|
||||
|
||||
UpdateListIndicesFromIndex(animVal->mItems, aIndex + 1);
|
||||
}
|
||||
|
|
|
@ -388,7 +388,8 @@ DOMSVGPathSegList::InsertItemBefore(DOMSVGPathSeg& aNewItem,
|
|||
1 + argCount));
|
||||
MOZ_ALWAYS_TRUE(mItems.InsertElementAt(aIndex,
|
||||
ItemProxy(domItem.get(),
|
||||
internalIndex)));
|
||||
internalIndex),
|
||||
fallible));
|
||||
|
||||
// This MUST come after the insertion into InternalList(), or else under the
|
||||
// insertion into InternalList() the values read from domItem would be bad
|
||||
|
@ -542,7 +543,8 @@ DOMSVGPathSegList::
|
|||
|
||||
MOZ_ALWAYS_TRUE(animVal->mItems.InsertElementAt(aIndex,
|
||||
ItemProxy(nullptr,
|
||||
aInternalIndex)));
|
||||
aInternalIndex),
|
||||
fallible));
|
||||
|
||||
animVal->UpdateListIndicesFromIndex(aIndex + 1, 1 + aArgCountForItem);
|
||||
}
|
||||
|
|
|
@ -317,7 +317,7 @@ DOMSVGPointList::InsertItemBefore(nsISVGPoint& aNewItem, uint32_t aIndex,
|
|||
MaybeInsertNullInAnimValListAt(aIndex);
|
||||
|
||||
InternalList().InsertItem(aIndex, domItem->ToSVGPoint());
|
||||
MOZ_ALWAYS_TRUE(mItems.InsertElementAt(aIndex, domItem));
|
||||
MOZ_ALWAYS_TRUE(mItems.InsertElementAt(aIndex, domItem, fallible));
|
||||
|
||||
// This MUST come after the insertion into InternalList(), or else under the
|
||||
// insertion into InternalList() the values read from domItem would be bad
|
||||
|
@ -433,7 +433,7 @@ DOMSVGPointList::MaybeInsertNullInAnimValListAt(uint32_t aIndex)
|
|||
MOZ_ASSERT(animVal->mItems.Length() == mItems.Length(),
|
||||
"animVal list not in sync!");
|
||||
|
||||
MOZ_ALWAYS_TRUE(animVal->mItems.InsertElementAt(aIndex, nullptr));
|
||||
MOZ_ALWAYS_TRUE(animVal->mItems.InsertElementAt(aIndex, nullptr, fallible));
|
||||
|
||||
UpdateListIndicesFromIndex(animVal->mItems, aIndex + 1);
|
||||
}
|
||||
|
|
|
@ -258,7 +258,7 @@ DOMSVGTransformList::InsertItemBefore(SVGTransform& newItem,
|
|||
MaybeInsertNullInAnimValListAt(index);
|
||||
|
||||
InternalList().InsertItem(index, domItem->ToSVGTransform());
|
||||
MOZ_ALWAYS_TRUE(mItems.InsertElementAt(index, domItem.get()));
|
||||
MOZ_ALWAYS_TRUE(mItems.InsertElementAt(index, domItem.get(), fallible));
|
||||
|
||||
// This MUST come after the insertion into InternalList(), or else under the
|
||||
// insertion into InternalList() the values read from domItem would be bad
|
||||
|
@ -406,7 +406,7 @@ DOMSVGTransformList::MaybeInsertNullInAnimValListAt(uint32_t aIndex)
|
|||
MOZ_ASSERT(animVal->mItems.Length() == mItems.Length(),
|
||||
"animVal list not in sync!");
|
||||
|
||||
MOZ_ALWAYS_TRUE(animVal->mItems.InsertElementAt(aIndex, nullptr));
|
||||
MOZ_ALWAYS_TRUE(animVal->mItems.InsertElementAt(aIndex, nullptr, fallible));
|
||||
|
||||
UpdateListIndicesFromIndex(animVal->mItems, aIndex + 1);
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ private:
|
|||
|
||||
bool InsertItem(uint32_t aIndex, const SVGLength &aLength) {
|
||||
if (aIndex >= mLengths.Length()) aIndex = mLengths.Length();
|
||||
return !!mLengths.InsertElementAt(aIndex, aLength);
|
||||
return !!mLengths.InsertElementAt(aIndex, aLength, fallible);
|
||||
}
|
||||
|
||||
void ReplaceItem(uint32_t aIndex, const SVGLength &aLength) {
|
||||
|
|
|
@ -110,7 +110,7 @@ private:
|
|||
if (aIndex >= mNumbers.Length()) {
|
||||
aIndex = mNumbers.Length();
|
||||
}
|
||||
return !!mNumbers.InsertElementAt(aIndex, aNumber);
|
||||
return !!mNumbers.InsertElementAt(aIndex, aNumber, fallible);
|
||||
}
|
||||
|
||||
void ReplaceItem(uint32_t aIndex, const float &aNumber) {
|
||||
|
|
|
@ -118,7 +118,7 @@ private:
|
|||
if (aIndex >= mItems.Length()) {
|
||||
aIndex = mItems.Length();
|
||||
}
|
||||
return !!mItems.InsertElementAt(aIndex, aPoint);
|
||||
return !!mItems.InsertElementAt(aIndex, aPoint, fallible);
|
||||
}
|
||||
|
||||
void ReplaceItem(uint32_t aIndex, const SVGPoint &aPoint) {
|
||||
|
|
|
@ -105,7 +105,7 @@ private:
|
|||
if (aIndex >= mStrings.Length()) {
|
||||
aIndex = mStrings.Length();
|
||||
}
|
||||
if (mStrings.InsertElementAt(aIndex, aString)) {
|
||||
if (mStrings.InsertElementAt(aIndex, aString, fallible)) {
|
||||
mIsSet = true;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ private:
|
|||
if (aIndex >= mItems.Length()) {
|
||||
aIndex = mItems.Length();
|
||||
}
|
||||
return !!mItems.InsertElementAt(aIndex, aTransform);
|
||||
return !!mItems.InsertElementAt(aIndex, aTransform, fallible);
|
||||
}
|
||||
|
||||
void ReplaceItem(uint32_t aIndex, const nsSVGTransform& aTransform) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче