diff --git a/dom/crypto/CryptoBuffer.cpp b/dom/crypto/CryptoBuffer.cpp index 95777d8b0895..20f76a45d497 100644 --- a/dom/crypto/CryptoBuffer.cpp +++ b/dom/crypto/CryptoBuffer.cpp @@ -17,13 +17,14 @@ CryptoBuffer::Assign(const CryptoBuffer& aData) { // Same as in nsTArray_Impl::operator=, but return the value // returned from ReplaceElementsAt to enable OOM detection - return ReplaceElementsAt(0, Length(), aData.Elements(), aData.Length()); + return ReplaceElementsAt(0, Length(), aData.Elements(), aData.Length(), + fallible); } uint8_t* CryptoBuffer::Assign(const uint8_t* aData, uint32_t aLength) { - return ReplaceElementsAt(0, Length(), aData, aLength); + return ReplaceElementsAt(0, Length(), aData, aLength, fallible); } uint8_t* diff --git a/dom/media/MediaData.cpp b/dom/media/MediaData.cpp index d5de3c8c9ab9..bcb0770bcfc2 100644 --- a/dom/media/MediaData.cpp +++ b/dom/media/MediaData.cpp @@ -654,7 +654,7 @@ MediaRawDataWriter::Replace(const uint8_t* aData, size_t aSize) // We ensure sufficient capacity above so this shouldn't fail. MOZ_ALWAYS_TRUE(mBuffer->ReplaceElementsAt(mTarget->mPadding, mTarget->mSize, - aData, aSize)); + aData, aSize, fallible)); mTarget->mSize = mSize = aSize; return true; } diff --git a/dom/svg/DOMSVGPathSegList.cpp b/dom/svg/DOMSVGPathSegList.cpp index 7b34f84a0351..0f7f445c0941 100644 --- a/dom/svg/DOMSVGPathSegList.cpp +++ b/dom/svg/DOMSVGPathSegList.cpp @@ -438,10 +438,9 @@ DOMSVGPathSegList::ReplaceItem(DOMSVGPathSeg& aNewItem, float segAsRaw[1 + NS_SVG_PATH_SEG_MAX_ARGS]; domItem->ToSVGPathSegEncodedData(segAsRaw); - bool ok = !!InternalList().mData.ReplaceElementsAt( - internalIndex, 1 + oldArgCount, - segAsRaw, 1 + newArgCount); - if (!ok) { + if (!InternalList().mData.ReplaceElementsAt(internalIndex, 1 + oldArgCount, + segAsRaw, 1 + newArgCount, + fallible)) { aError.Throw(NS_ERROR_OUT_OF_MEMORY); return nullptr; }