Bug 968520 - Add mozilla::fallible to FallibleTArray::AppendElements calls. r=froydnj
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Thu, 28 May 2015 11:07:43 -0700
changeset 276963 182efe94d6b3dfe073bb2f40c61da621cd68556b
parent 276962 5d83a9455008c756faa66ee89e14eff8e42edec3
child 276964 2e84ad186322885a3cef208e5a3ebaa2235be7e6
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs968520
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 968520 - Add mozilla::fallible to FallibleTArray::AppendElements calls. r=froydnj
dom/base/nsJSTimeoutHandler.cpp
dom/crypto/WebCryptoTask.cpp
dom/datastore/DataStoreDB.cpp
dom/indexedDB/ActorsParent.cpp
dom/media/MediaData.cpp
dom/media/mediasource/ResourceQueue.cpp
dom/media/mediasource/SourceBuffer.cpp
dom/mobilemessage/MobileMessageManager.cpp
dom/workers/DataStore.cpp
gfx/thebes/gfxFontUtils.cpp
ipc/glue/IPCMessageUtils.h
layout/generic/nsTextFrame.cpp
layout/style/FontFaceSet.cpp
media/libstagefright/binding/BufferStream.cpp
media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
netwerk/base/MemoryDownloader.cpp
netwerk/base/nsUDPSocket.cpp
storage/Variant.h
toolkit/components/url-classifier/HashStore.cpp
--- a/dom/base/nsJSTimeoutHandler.cpp
+++ b/dom/base/nsJSTimeoutHandler.cpp
@@ -404,17 +404,17 @@ nsresult NS_CreateJSTimeoutHandler(nsGlo
 }
 
 already_AddRefed<nsIScriptTimeoutHandler>
 NS_CreateJSTimeoutHandler(nsGlobalWindow *aWindow, Function& aFunction,
                           const Sequence<JS::Value>& aArguments,
                           ErrorResult& aError)
 {
   FallibleTArray<JS::Heap<JS::Value> > args;
-  if (!args.AppendElements(aArguments)) {
+  if (!args.AppendElements(aArguments, fallible)) {
     aError.Throw(NS_ERROR_OUT_OF_MEMORY);
     return nullptr;
   }
 
   nsRefPtr<nsJSScriptTimeoutHandler> handler =
     new nsJSScriptTimeoutHandler(aWindow, aFunction, args, aError);
   return aError.Failed() ? nullptr : handler.forget();
 }
--- a/dom/crypto/WebCryptoTask.cpp
+++ b/dom/crypto/WebCryptoTask.cpp
@@ -2000,17 +2000,17 @@ private:
       if (!mAlg.IsEmpty()) {
         mJwk.mAlg.Construct(mAlg);
       }
 
       mJwk.mExt.Construct(mExtractable);
 
       if (!mKeyUsages.IsEmpty()) {
         mJwk.mKey_ops.Construct();
-        if (!mJwk.mKey_ops.Value().AppendElements(mKeyUsages)) {
+        if (!mJwk.mKey_ops.Value().AppendElements(mKeyUsages, fallible)) {
           return NS_ERROR_OUT_OF_MEMORY;
         }
       }
 
       return NS_OK;
     }
 
     return NS_ERROR_DOM_SYNTAX_ERR;
--- a/dom/datastore/DataStoreDB.cpp
+++ b/dom/datastore/DataStoreDB.cpp
@@ -311,17 +311,18 @@ DataStoreDB::DatabaseOpened()
     new VersionChangeListener(mDatabase);
   rv = mDatabase->EventTarget::AddEventListener(
     NS_LITERAL_STRING("versionchange"), listener, false);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   StringOrStringSequence objectStores;
-  if (!objectStores.RawSetAsStringSequence().AppendElements(mObjectStores)) {
+  if (!objectStores.RawSetAsStringSequence().AppendElements(mObjectStores,
+                                                            fallible)) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   nsRefPtr<IDBTransaction> txn;
   error = mDatabase->Transaction(objectStores,
                                  mTransactionMode,
                                  getter_AddRefs(txn));
   if (NS_WARN_IF(error.Failed())) {
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -20899,17 +20899,18 @@ VersionChangeOp::RunOnOwningThread()
       }
     } else {
       // Inform all the other databases that they are now invalidated. That
       // should remove the previous metadata from our table.
       if (info) {
         MOZ_ASSERT(!info->mLiveDatabases.IsEmpty());
 
         FallibleTArray<Database*> liveDatabases;
-        if (NS_WARN_IF(!liveDatabases.AppendElements(info->mLiveDatabases))) {
+        if (NS_WARN_IF(!liveDatabases.AppendElements(info->mLiveDatabases,
+                                                     fallible))) {
           deleteOp->SetFailureCode(NS_ERROR_OUT_OF_MEMORY);
         } else {
 #ifdef DEBUG
           // The code below should result in the deletion of |info|. Set to null
           // here to make sure we find invalid uses later.
           info = nullptr;
 #endif
           for (uint32_t count = liveDatabases.Length(), index = 0;
--- a/dom/media/MediaData.cpp
+++ b/dom/media/MediaData.cpp
@@ -503,18 +503,18 @@ MediaRawData::MediaRawData(const uint8_t
   , mBuffer(new MediaLargeByteBuffer(RAW_DATA_DEFAULT_SIZE))
   , mPadding(0)
 {
   if (!EnsureCapacity(aSize)) {
     return;
   }
 
   // We ensure sufficient capacity above so this shouldn't fail.
-  MOZ_ALWAYS_TRUE(mBuffer->AppendElements(aData, aSize));
-  MOZ_ALWAYS_TRUE(mBuffer->AppendElements(RAW_DATA_ALIGNMENT));
+  MOZ_ALWAYS_TRUE(mBuffer->AppendElements(aData, aSize, fallible));
+  MOZ_ALWAYS_TRUE(mBuffer->AppendElements(RAW_DATA_ALIGNMENT, fallible));
   mSize = aSize;
 }
 
 already_AddRefed<MediaRawData>
 MediaRawData::Clone() const
 {
   nsRefPtr<MediaRawData> s = new MediaRawData;
   s->mTimecode = mTimecode;
@@ -525,18 +525,18 @@ MediaRawData::Clone() const
   s->mExtraData = mExtraData;
   s->mCryptoInternal = mCryptoInternal;
   if (mSize) {
     if (!s->EnsureCapacity(mSize)) {
       return nullptr;
     }
 
     // We ensure sufficient capacity above so this shouldn't fail.
-    MOZ_ALWAYS_TRUE(s->mBuffer->AppendElements(mData, mSize));
-    MOZ_ALWAYS_TRUE(s->mBuffer->AppendElements(RAW_DATA_ALIGNMENT));
+    MOZ_ALWAYS_TRUE(s->mBuffer->AppendElements(mData, mSize, fallible));
+    MOZ_ALWAYS_TRUE(s->mBuffer->AppendElements(RAW_DATA_ALIGNMENT, fallible));
     s->mSize = mSize;
   }
   return s.forget();
 }
 
 bool
 MediaRawData::EnsureCapacity(size_t aSize)
 {
--- a/dom/media/mediasource/ResourceQueue.cpp
+++ b/dom/media/mediasource/ResourceQueue.cpp
@@ -108,17 +108,18 @@ uint32_t ResourceQueue::EvictBefore(uint
       if (aOffset <= mOffset) {
         break;
       }
       uint32_t offset = aOffset - mOffset;
       mOffset += offset;
       evicted += offset;
       nsRefPtr<MediaLargeByteBuffer> data = new MediaLargeByteBuffer;
       if (!data->AppendElements(item->mData->Elements() + offset,
-                                item->mData->Length() - offset)) {
+                                item->mData->Length() - offset,
+                                fallible)) {
         aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
         return 0;
       }
 
       item->mData = data;
       break;
     }
     mOffset += item->mData->Length();
--- a/dom/media/mediasource/SourceBuffer.cpp
+++ b/dom/media/mediasource/SourceBuffer.cpp
@@ -561,17 +561,17 @@ SourceBuffer::PrepareAppend(const uint8_
   if (aLength > mEvictionThreshold ||
       ((mTrackBuffer->GetSize() > mEvictionThreshold - aLength) &&
        !mTrackBuffer->HasOnlyIncompleteMedia())) {
     aRv.Throw(NS_ERROR_DOM_QUOTA_EXCEEDED_ERR);
     return nullptr;
   }
 
   nsRefPtr<MediaLargeByteBuffer> data = new MediaLargeByteBuffer();
-  if (!data->AppendElements(aData, aLength)) {
+  if (!data->AppendElements(aData, aLength, fallible)) {
     aRv.Throw(NS_ERROR_DOM_QUOTA_EXCEEDED_ERR);
     return nullptr;
   }
   // TODO: Test buffer full flag.
   return data.forget();
 }
 
 double
--- a/dom/mobilemessage/MobileMessageManager.cpp
+++ b/dom/mobilemessage/MobileMessageManager.cpp
@@ -648,25 +648,27 @@ MobileMessageManager::DispatchTrustedDel
     init.mBubbles = false;
     init.mCancelable = false;
     DeletedMessageInfo* info =
       static_cast<DeletedMessageInfo*>(deletedInfo.get());
 
     uint32_t msgIdLength = info->GetData().deletedMessageIds().Length();
     if (msgIdLength) {
       Sequence<int32_t>& deletedMsgIds = init.mDeletedMessageIds.SetValue();
-      if (!deletedMsgIds.AppendElements(info->GetData().deletedMessageIds())) {
+      if (!deletedMsgIds.AppendElements(info->GetData().deletedMessageIds(),
+                                        fallible)) {
         return NS_ERROR_OUT_OF_MEMORY;
       }
     }
 
     uint32_t threadIdLength = info->GetData().deletedThreadIds().Length();
     if (threadIdLength) {
       Sequence<uint64_t>& deletedThreadIds = init.mDeletedThreadIds.SetValue();
-      if (!deletedThreadIds.AppendElements(info->GetData().deletedThreadIds())) {
+      if (!deletedThreadIds.AppendElements(info->GetData().deletedThreadIds(),
+                                           fallible)) {
         return NS_ERROR_OUT_OF_MEMORY;
       }
     }
 
     nsRefPtr<MozMessageDeletedEvent> event =
       MozMessageDeletedEvent::Constructor(this, DELETED_EVENT_NAME, init);
     return DispatchTrustedEvent(event);
   }
--- a/dom/workers/DataStore.cpp
+++ b/dom/workers/DataStore.cpp
@@ -183,17 +183,17 @@ public:
                        const Sequence<OwningStringOrUnsignedLong>& aId,
                        ErrorResult& aRv)
     : DataStoreProxyRunnable(aWorkerPrivate, aBackingStore, aWorkerPromise)
     , mRv(aRv)
   {
     MOZ_ASSERT(aWorkerPrivate);
     aWorkerPrivate->AssertIsOnWorkerThread();
 
-    if (!mId.AppendElements(aId)) {
+    if (!mId.AppendElements(aId, fallible)) {
       mRv.Throw(NS_ERROR_OUT_OF_MEMORY);
     }
   }
 
 protected:
   virtual bool
   MainThreadRun() override
   {
--- a/gfx/thebes/gfxFontUtils.cpp
+++ b/gfx/thebes/gfxFontUtils.cpp
@@ -987,17 +987,17 @@ gfxFontUtils::RenameFont(const nsAString
     if (dataLength + nameTableSize > UINT32_MAX)
         return NS_ERROR_FAILURE;
         
     // bug 505386 - need to handle unpadded font length
     uint32_t paddedFontDataSize = (aFontDataLength + 3) & ~3;
     uint32_t adjFontDataSize = paddedFontDataSize + nameTableSize;
 
     // create new buffer: old font data plus new name table
-    if (!aNewFont->AppendElements(adjFontDataSize))
+    if (!aNewFont->AppendElements(adjFontDataSize, fallible))
         return NS_ERROR_OUT_OF_MEMORY;
 
     // copy the old font data
     uint8_t *newFontData = reinterpret_cast<uint8_t*>(aNewFont->Elements());
     
     // null the last four bytes in case the font length is not a multiple of 4
     memset(newFontData + aFontDataLength, 0, paddedFontDataSize - aFontDataLength);
 
--- a/ipc/glue/IPCMessageUtils.h
+++ b/ipc/glue/IPCMessageUtils.h
@@ -509,17 +509,17 @@ struct ParamTraits<FallibleTArray<E> >
         return false;
       }
 
       const char* outdata;
       if (!aMsg->ReadBytes(aIter, &outdata, pickledLength)) {
         return false;
       }
 
-      E* elements = aResult->AppendElements(length);
+      E* elements = aResult->AppendElements(length, mozilla::fallible);
       if (!elements) {
         return false;
       }
 
       memcpy(elements, outdata, pickledLength);
     } else {
       if (!aResult->SetCapacity(length, mozilla::fallible)) {
         return false;
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -1497,17 +1497,17 @@ void BuildTextRunsScanner::FlushFrames(b
       }
       if (textRun->GetFlags() & gfxTextRunFactory::TEXT_TRAILING_ARABICCHAR) {
         mNextRunContextInfo |= nsTextFrameUtils::INCOMING_ARABICCHAR;
       }
     } else {
       AutoFallibleTArray<uint8_t,BIG_TEXT_NODE_SIZE> buffer;
       uint32_t bufferSize = mMaxTextLength*(mDoubleByteText ? 2 : 1);
       if (bufferSize < mMaxTextLength || bufferSize == UINT32_MAX ||
-          !buffer.AppendElements(bufferSize)) {
+          !buffer.AppendElements(bufferSize, fallible)) {
         return;
       }
       textRun = BuildTextRunForFrames(buffer.Elements());
     }
   }
 
   if (aFlushLineBreaks) {
     FlushLineBreaks(aSuppressTrailingBreak ? nullptr : textRun);
@@ -2045,17 +2045,17 @@ BuildTextRunsScanner::BuildTextRunForFra
           compression, &mNextRunContextInfo, &skipChars, &analysisFlags);
       aTextBuffer = bufEnd;
       currentTransformedTextOffset = bufEnd - static_cast<const char16_t*>(textPtr);
     } else {
       if (mDoubleByteText) {
         // Need to expand the text. First transform it into a temporary buffer,
         // then expand.
         AutoFallibleTArray<uint8_t,BIG_TEXT_NODE_SIZE> tempBuf;
-        uint8_t* bufStart = tempBuf.AppendElements(contentLength);
+        uint8_t* bufStart = tempBuf.AppendElements(contentLength, fallible);
         if (!bufStart) {
           DestroyUserData(userDataToDestroy);
           return nullptr;
         }
         uint8_t* end = nsTextFrameUtils::TransformText(
             reinterpret_cast<const uint8_t*>(frag->Get1b()) + contentStart, contentLength,
             bufStart, compression, &mNextRunContextInfo, &skipChars, &analysisFlags);
         aTextBuffer = ExpandBuffer(static_cast<char16_t*>(aTextBuffer),
@@ -2263,17 +2263,17 @@ BuildTextRunsScanner::BuildTextRunForFra
 bool
 BuildTextRunsScanner::SetupLineBreakerContext(gfxTextRun *aTextRun)
 {
   AutoFallibleTArray<uint8_t,BIG_TEXT_NODE_SIZE> buffer;
   uint32_t bufferSize = mMaxTextLength*(mDoubleByteText ? 2 : 1);
   if (bufferSize < mMaxTextLength || bufferSize == UINT32_MAX) {
     return false;
   }
-  void *textPtr = buffer.AppendElements(bufferSize);
+  void *textPtr = buffer.AppendElements(bufferSize, fallible);
   if (!textPtr) {
     return false;
   }
 
   gfxSkipChars skipChars;
 
   nsAutoTArray<int32_t,50> textBreakPoints;
   TextRunUserData dummyData;
@@ -2336,17 +2336,17 @@ BuildTextRunsScanner::SetupLineBreakerCo
           frag->Get2b() + contentStart, contentLength, bufStart,
           compression, &mNextRunContextInfo, &skipChars, &analysisFlags);
       textPtr = bufEnd;
     } else {
       if (mDoubleByteText) {
         // Need to expand the text. First transform it into a temporary buffer,
         // then expand.
         AutoFallibleTArray<uint8_t,BIG_TEXT_NODE_SIZE> tempBuf;
-        uint8_t* bufStart = tempBuf.AppendElements(contentLength);
+        uint8_t* bufStart = tempBuf.AppendElements(contentLength, fallible);
         if (!bufStart) {
           DestroyUserData(userDataToDestroy);
           return false;
         }
         uint8_t* end = nsTextFrameUtils::TransformText(
             reinterpret_cast<const uint8_t*>(frag->Get1b()) + contentStart, contentLength,
             bufStart, compression, &mNextRunContextInfo, &skipChars, &analysisFlags);
         textPtr = ExpandBuffer(static_cast<char16_t*>(textPtr),
@@ -5636,17 +5636,17 @@ nsTextFrame::PaintTextWithSelectionColor
     nsTextPaintStyle& aTextPaintStyle, SelectionDetails* aDetails,
     SelectionType* aAllTypes,
     const nsCharClipDisplayItem::ClipEdges& aClipEdges,
     nsTextFrame::DrawPathCallbacks* aCallbacks)
 {
   // Figure out which selections control the colors to use for each character.
   AutoFallibleTArray<SelectionDetails*,BIG_TEXT_NODE_SIZE> prevailingSelectionsBuffer;
   SelectionDetails** prevailingSelections =
-    prevailingSelectionsBuffer.AppendElements(aContentLength);
+    prevailingSelectionsBuffer.AppendElements(aContentLength, fallible);
   if (!prevailingSelections) {
     return false;
   }
 
   SelectionType allTypes = 0;
   for (uint32_t i = 0; i < aContentLength; ++i) {
     prevailingSelections[i] = nullptr;
   }
@@ -5776,17 +5776,17 @@ nsTextFrame::PaintTextSelectionDecoratio
 {
   // Hide text decorations if we're currently hiding @font-face fallback text
   if (aProvider.GetFontGroup()->ShouldSkipDrawing())
     return;
 
   // Figure out which characters will be decorated for this selection.
   AutoFallibleTArray<SelectionDetails*, BIG_TEXT_NODE_SIZE> selectedCharsBuffer;
   SelectionDetails** selectedChars =
-    selectedCharsBuffer.AppendElements(aContentLength);
+    selectedCharsBuffer.AppendElements(aContentLength, fallible);
   if (!selectedChars) {
     return;
   }
   for (uint32_t i = 0; i < aContentLength; ++i) {
     selectedChars[i] = nullptr;
   }
 
   SelectionDetails *sdptr = aDetails;
@@ -7451,17 +7451,18 @@ nsTextFrame::AddInlineMinISizeForFlow(ns
   bool preformatTabs = textStyle->WhiteSpaceIsSignificant();
   gfxFloat tabWidth = -1;
   uint32_t start =
     FindStartAfterSkippingWhitespace(&provider, aData, textStyle, &iter, flowEndInTextRun);
 
   AutoFallibleTArray<bool,BIG_TEXT_NODE_SIZE> hyphBuffer;
   bool *hyphBreakBefore = nullptr;
   if (hyphenating) {
-    hyphBreakBefore = hyphBuffer.AppendElements(flowEndInTextRun - start);
+    hyphBreakBefore = hyphBuffer.AppendElements(flowEndInTextRun - start,
+                                                fallible);
     if (hyphBreakBefore) {
       provider.GetHyphenationBreaks(start, flowEndInTextRun - start,
                                     hyphBreakBefore);
     }
   }
 
   for (uint32_t i = start, wordStart = start; i <= flowEndInTextRun; ++i) {
     bool preformattedNewline = false;
--- a/layout/style/FontFaceSet.cpp
+++ b/layout/style/FontFaceSet.cpp
@@ -1539,17 +1539,17 @@ void
 FontFaceSet::DispatchLoadingFinishedEvent(
                                  const nsAString& aType,
                                  const nsTArray<FontFace*>& aFontFaces)
 {
   CSSFontFaceLoadEventInit init;
   init.mBubbles = false;
   init.mCancelable = false;
   OwningNonNull<FontFace>* elements =
-    init.mFontfaces.AppendElements(aFontFaces.Length());
+    init.mFontfaces.AppendElements(aFontFaces.Length(), fallible);
   MOZ_ASSERT(elements);
   for (size_t i = 0; i < aFontFaces.Length(); i++) {
     elements[i] = aFontFaces[i];
   }
   nsRefPtr<CSSFontFaceLoadEvent> event =
     CSSFontFaceLoadEvent::Constructor(this, aType, init);
   (new AsyncEventDispatcher(this, event))->RunDOMEventWhenSafe();
 }
--- a/media/libstagefright/binding/BufferStream.cpp
+++ b/media/libstagefright/binding/BufferStream.cpp
@@ -61,17 +61,17 @@ BufferStream::DiscardBefore(int64_t aOff
     mData->RemoveElementsAt(0, aOffset - mStartOffset);
     mStartOffset = aOffset;
   }
 }
 
 bool
 BufferStream::AppendBytes(const uint8_t* aData, size_t aLength)
 {
-  return mData->AppendElements(aData, aLength);
+  return mData->AppendElements(aData, aLength, fallible);
 }
 
 MediaByteRange
 BufferStream::GetByteRange()
 {
   return MediaByteRange(mStartOffset, mStartOffset + mData->Length());
 }
 }
--- a/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
+++ b/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
@@ -657,17 +657,17 @@ WebrtcGlobalParent::RecvGetLogResult(con
   MOZ_ASSERT(NS_IsMainThread());
 
   LogRequest* request = LogRequest::Get(aRequestId);
 
   if (!request) {
     CSFLogError(logTag, "Bad RequestId");
     return false;
   }
-  request->mResult.AppendElements(aLog);
+  request->mResult.AppendElements(aLog, fallible);
 
   auto next = request->GetNextParent();
   if (next) {
     // There are more content instances to query.
     return next->SendGetLogRequest(request->mRequestId, request->mPattern);
   }
 
   // Content queries complete, run chrome instance query if applicable
--- a/netwerk/base/MemoryDownloader.cpp
+++ b/netwerk/base/MemoryDownloader.cpp
@@ -52,17 +52,17 @@ NS_METHOD
 MemoryDownloader::ConsumeData(nsIInputStream* aIn,
                               void* aClosure,
                               const char* aFromRawSegment,
                               uint32_t aToOffset,
                               uint32_t aCount,
                               uint32_t* aWriteCount)
 {
   MemoryDownloader* self = static_cast<MemoryDownloader*>(aClosure);
-  if (!self->mData->AppendElements(aFromRawSegment, aCount)) {
+  if (!self->mData->AppendElements(aFromRawSegment, aCount, fallible)) {
     // The error returned by ConsumeData isn't propagated to the
     // return of ReadSegments, so it has to be passed as state.
     self->mStatus = NS_ERROR_OUT_OF_MEMORY;
     return NS_ERROR_OUT_OF_MEMORY;
   }
   *aWriteCount = aCount;
   return NS_OK;
 }
--- a/netwerk/base/nsUDPSocket.cpp
+++ b/netwerk/base/nsUDPSocket.cpp
@@ -669,17 +669,17 @@ nsUDPSocket::OnSocketReady(PRFileDesc *f
     NS_WARNING("error of recvfrom on UDP socket");
     mCondition = NS_ERROR_UNEXPECTED;
     return;
   }
   mByteReadCount += count;
   SaveNetworkStats(false);
 
   FallibleTArray<uint8_t> data;
-  if(!data.AppendElements(buff, count)){
+  if (!data.AppendElements(buff, count, fallible)) {
     mCondition = NS_ERROR_UNEXPECTED;
     return;
   }
 
   nsCOMPtr<nsIAsyncInputStream> pipeIn;
   nsCOMPtr<nsIAsyncOutputStream> pipeOut;
 
   uint32_t segsize = UDP_PACKET_CHUNK_SIZE;
--- a/storage/Variant.h
+++ b/storage/Variant.h
@@ -258,17 +258,17 @@ template < >
 struct variant_storage_traits<uint8_t[], false>
 {
   typedef std::pair<const void *, int> ConstructorType;
   typedef FallibleTArray<uint8_t> StorageType;
   static inline void storage_conversion(ConstructorType aBlob, StorageType* _outData)
   {
     _outData->Clear();
     (void)_outData->AppendElements(static_cast<const uint8_t *>(aBlob.first),
-                                   aBlob.second);
+                                   aBlob.second, fallible);
   }
   static inline void destroy(const StorageType& _outData)
   { }
 };
 template < >
 struct variant_storage_traits<uint8_t[], true>
 {
   typedef std::pair<uint8_t *, int> ConstructorType;
--- a/toolkit/components/url-classifier/HashStore.cpp
+++ b/toolkit/components/url-classifier/HashStore.cpp
@@ -473,17 +473,17 @@ Merge(ChunkSet* aStoreChunks,
         return NS_ERROR_OUT_OF_MEMORY;
     }
   }
 
   // Chunks can be empty, but we should still report we have them
   // to make the chunkranges continuous.
   aStoreChunks->Merge(aUpdateChunks);
 
-  aStorePrefixes->AppendElements(adds);
+  aStorePrefixes->AppendElements(adds, fallible);
   EntrySort(*aStorePrefixes);
 
   return NS_OK;
 }
 
 nsresult
 HashStore::ApplyUpdate(TableUpdate &update)
 {