Bug 1185763 - Part 3: Rename nsTArray::MoveElementsFrom to AppendElements. r=froydnj
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Tue, 11 Aug 2015 08:29:46 -0700
changeset 257269 ca1f72e930c444e8cc46a5a6bc66c0d29e42ff45
parent 257268 d35a4a640099a06a768c5be21069f2ea33851b25
child 257270 f6087016fc5dcddd91de7326954b1bf48e1074ac
push id29210
push userkwierso@gmail.com
push dateTue, 11 Aug 2015 22:35:38 +0000
treeherdermozilla-central@7dcecc8a395d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1185763
milestone43.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 1185763 - Part 3: Rename nsTArray::MoveElementsFrom to AppendElements. r=froydnj
dom/events/NotifyPaintEvent.cpp
dom/media/Intervals.h
dom/media/MediaFormatReader.cpp
dom/media/MediaManager.cpp
dom/media/MediaSegment.h
dom/media/MediaStreamGraph.cpp
dom/media/webrtc/MediaEngineCameraVideoSource.cpp
gfx/layers/Layers.cpp
gfx/layers/composite/LayerManagerComposite.h
layout/base/nsDisplayList.cpp
layout/base/nsDisplayList.h
layout/base/nsPresContext.h
parser/html/nsHtml5Speculation.cpp
parser/html/nsHtml5TreeOpExecutor.cpp
parser/html/nsHtml5TreeOpStage.cpp
tools/profiler/tasktracer/GeckoTaskTracer.cpp
xpcom/glue/nsTArray.h
--- a/dom/events/NotifyPaintEvent.cpp
+++ b/dom/events/NotifyPaintEvent.cpp
@@ -21,17 +21,17 @@ NotifyPaintEvent::NotifyPaintEvent(Event
                                    uint32_t aEventType,
                                    nsInvalidateRequestList* aInvalidateRequests)
   : Event(aOwner, aPresContext, aEvent)
 {
   if (mEvent) {
     mEvent->message = aEventType;
   }
   if (aInvalidateRequests) {
-    mInvalidateRequests.MoveElementsFrom(Move(aInvalidateRequests->mRequests));
+    mInvalidateRequests.AppendElements(Move(aInvalidateRequests->mRequests));
   }
 }
 
 NS_INTERFACE_MAP_BEGIN(NotifyPaintEvent)
   NS_INTERFACE_MAP_ENTRY(nsIDOMNotifyPaintEvent)
 NS_INTERFACE_MAP_END_INHERITING(Event)
 
 NS_IMPL_ADDREF_INHERITED(NotifyPaintEvent, Event)
--- a/dom/media/Intervals.h
+++ b/dom/media/Intervals.h
@@ -264,17 +264,17 @@ public:
 
   IntervalSet(const SelfType& aOther)
     : mIntervals(aOther.mIntervals)
   {
   }
 
   IntervalSet(SelfType&& aOther)
   {
-    mIntervals.MoveElementsFrom(Move(aOther.mIntervals));
+    mIntervals.AppendElements(Move(aOther.mIntervals));
   }
 
   explicit IntervalSet(const ElemType& aOther)
   {
     if (!aOther.IsEmpty()) {
       mIntervals.AppendElement(aOther);
     }
   }
@@ -374,17 +374,17 @@ public:
     }
     if (!inserted) {
       normalized.AppendElement(Move(current));
     }
     for (; i < mIntervals.Length(); i++) {
       normalized.AppendElement(Move(mIntervals[i]));
     }
     mIntervals.Clear();
-    mIntervals.MoveElementsFrom(Move(normalized));
+    mIntervals.AppendElements(Move(normalized));
 
     return *this;
   }
 
   SelfType& operator+= (const SelfType& aIntervals)
   {
     Add(aIntervals);
     return *this;
@@ -477,17 +477,17 @@ public:
       }
       if (mIntervals[i].mEnd < other[j].mEnd) {
         i++;
       } else {
         j++;
       }
     }
     mIntervals.Clear();
-    mIntervals.MoveElementsFrom(Move(intersection));
+    mIntervals.AppendElements(Move(intersection));
     return *this;
   }
 
   SelfType& Intersection(const ElemType& aInterval)
   {
     SelfType intervals(aInterval);
     return Intersection(intervals);
   }
@@ -677,17 +677,17 @@ private:
         } else {
           normalized.AppendElement(Move(current));
           current = Move(interval);
         }
       }
       normalized.AppendElement(Move(current));
 
       mIntervals.Clear();
-      mIntervals.MoveElementsFrom(Move(normalized));
+      mIntervals.AppendElements(Move(normalized));
     }
   }
 
   struct CompareIntervals
   {
     bool Equals(const ElemType& aT1, const ElemType& aT2) const
     {
       return aT1.mStart == aT2.mStart && aT1.mEnd == aT2.mEnd;
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -989,17 +989,17 @@ MediaFormatReader::DecodeDemuxedSamples(
       decoder.mInfo = info;
       decoder.mLastStreamSourceID = info->GetID();
       // Flush will clear our array of queued samples. So make a copy now.
       nsTArray<nsRefPtr<MediaRawData>> samples{decoder.mQueuedSamples};
       Flush(aTrack);
       decoder.mDecoder->Shutdown();
       decoder.mDecoder = nullptr;
       if (sample->mKeyframe) {
-        decoder.mQueuedSamples.MoveElementsFrom(Move(samples));
+        decoder.mQueuedSamples.AppendElements(Move(samples));
         ScheduleUpdate(aTrack);
       } else {
         MOZ_ASSERT(decoder.mTimeThreshold.isNothing());
         LOG("Stream change occurred on a non-keyframe. Seeking to:%lld",
             sample->mTime);
         decoder.mTimeThreshold = Some(TimeUnit::FromMicroseconds(sample->mTime));
         nsRefPtr<MediaFormatReader> self = this;
         decoder.mSeekRequest.Begin(decoder.mTrackDemuxer->Seek(decoder.mTimeThreshold.ref())
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -989,17 +989,17 @@ ApplyConstraints(const MediaTrackConstra
         if (aSources[j]->GetBestFitnessDistance(aggregateConstraints) == UINT32_MAX) {
           rejects.AppendElement(aSources[j]);
           aSources.RemoveElementAt(j);
         } else {
           ++j;
         }
       }
       if (!aSources.Length()) {
-        aSources.MoveElementsFrom(Move(rejects));
+        aSources.AppendElements(Move(rejects));
         aggregateConstraints.RemoveElementAt(aggregateConstraints.Length() - 1);
       }
     }
   }
 }
 
 static bool
 ApplyConstraints(MediaStreamConstraints &aConstraints,
--- a/dom/media/MediaSegment.h
+++ b/dom/media/MediaSegment.h
@@ -320,17 +320,17 @@ protected:
     MOZ_ASSERT(aSource->mDuration >= 0);
     mDuration += aSource->mDuration;
     aSource->mDuration = 0;
     if (!mChunks.IsEmpty() && !aSource->mChunks.IsEmpty() &&
         mChunks[mChunks.Length() - 1].CanCombineWithFollowing(aSource->mChunks[0])) {
       mChunks[mChunks.Length() - 1].mDuration += aSource->mChunks[0].mDuration;
       aSource->mChunks.RemoveElementAt(0);
     }
-    mChunks.MoveElementsFrom(Move(aSource->mChunks));
+    mChunks.AppendElements(Move(aSource->mChunks));
   }
 
   void AppendSliceInternal(const MediaSegmentBase<C, Chunk>& aSource,
                            StreamTime aStart, StreamTime aEnd)
   {
     MOZ_ASSERT(aStart <= aEnd, "Endpoints inverted");
     NS_WARN_IF_FALSE(aStart >= 0 && aEnd <= aSource.mDuration, "Slice out of range");
     mDuration += aEnd - aStart;
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -1220,17 +1220,17 @@ MediaStreamGraphImpl::PrepareUpdatesToMa
       }
       StreamUpdate* update = mStreamUpdates.AppendElement();
       update->mStream = stream;
       update->mNextMainThreadCurrentTime =
         GraphTimeToStreamTime(stream, IterationEnd());
       update->mNextMainThreadFinished = stream->mNotifiedFinished;
     }
     if (!mPendingUpdateRunnables.IsEmpty()) {
-      mUpdateRunnables.MoveElementsFrom(Move(mPendingUpdateRunnables));
+      mUpdateRunnables.AppendElements(Move(mPendingUpdateRunnables));
     }
   }
 
   // Don't send the message to the main thread if it's not going to have
   // any work to do.
   if (aFinalUpdate ||
       !mUpdateRunnables.IsEmpty() ||
       !mStreamUpdates.IsEmpty()) {
@@ -1722,17 +1722,17 @@ MediaStreamGraphImpl::RunInStableState(b
       }
     }
 
     if ((mForceShutDown || !mRealtime) &&
         mLifecycleState == LIFECYCLE_WAITING_FOR_MAIN_THREAD_CLEANUP) {
       // Defer calls to RunDuringShutdown() to happen while mMonitor is not held.
       for (uint32_t i = 0; i < mBackMessageQueue.Length(); ++i) {
         MessageBlock& mb = mBackMessageQueue[i];
-        controlMessagesToRunDuringShutdown.MoveElementsFrom(Move(mb.mMessages));
+        controlMessagesToRunDuringShutdown.AppendElements(Move(mb.mMessages));
       }
       mBackMessageQueue.Clear();
       MOZ_ASSERT(mCurrentTaskMessageQueue.IsEmpty());
       // Stop MediaStreamGraph threads. Do not clear gGraph since
       // we have outstanding DOM objects that may need it.
       mLifecycleState = LIFECYCLE_WAITING_FOR_THREAD_SHUTDOWN;
       nsCOMPtr<nsIRunnable> event = new MediaStreamGraphShutDownRunnable(this);
       NS_DispatchToMainThread(event);
@@ -2412,17 +2412,17 @@ SourceMediaStream::AddTrackInternal(Trac
     GraphImpl()->EnsureNextIteration();
   }
 }
 
 void
 SourceMediaStream::FinishAddTracks()
 {
   MutexAutoLock lock(mMutex);
-  mUpdateTracks.MoveElementsFrom(Move(mPendingTracks));
+  mUpdateTracks.AppendElements(Move(mPendingTracks));
   if (GraphImpl()) {
     GraphImpl()->EnsureNextIteration();
   }
 }
 
 StreamBuffer::Track*
 SourceMediaStream::FindTrack(TrackID aID)
 {
--- a/dom/media/webrtc/MediaEngineCameraVideoSource.cpp
+++ b/dom/media/webrtc/MediaEngineCameraVideoSource.cpp
@@ -214,17 +214,17 @@ MediaEngineCameraVideoSource::ChooseCapa
         if (GetFitnessDistance(cap, cs, true, aDeviceId) == UINT32_MAX) {
           rejects.AppendElement(candidate);
           candidateSet.RemoveElementAt(i);
         } else {
           ++i;
         }
       }
       if (!candidateSet.Length()) {
-        candidateSet.MoveElementsFrom(Move(rejects));
+        candidateSet.AppendElements(Move(rejects));
       }
     }
   }
   if (!candidateSet.Length()) {
     LOG(("failed to find capability match from %d choices",num));
     return false;
   }
 
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -1183,24 +1183,24 @@ ContainerLayer::SortChildrenBy3DZOrder(n
 
   for (Layer* l = GetFirstChild(); l; l = l->GetNextSibling()) {
     ContainerLayer* container = l->AsContainerLayer();
     if (container && container->GetContentFlags() & CONTENT_PRESERVE_3D) {
       toSort.AppendElement(l);
     } else {
       if (toSort.Length() > 0) {
         SortLayersBy3DZOrder(toSort);
-        aArray.MoveElementsFrom(Move(toSort));
+        aArray.AppendElements(Move(toSort));
       }
       aArray.AppendElement(l);
     }
   }
   if (toSort.Length() > 0) {
     SortLayersBy3DZOrder(toSort);
-    aArray.MoveElementsFrom(Move(toSort));
+    aArray.AppendElements(Move(toSort));
   }
 }
 
 void
 ContainerLayer::DefaultComputeEffectiveTransforms(const Matrix4x4& aTransformToSurface)
 {
   Matrix residual;
   Matrix4x4 idealTransform = GetLocalTransform() * aTransformToSurface;
--- a/gfx/layers/composite/LayerManagerComposite.h
+++ b/gfx/layers/composite/LayerManagerComposite.h
@@ -270,17 +270,17 @@ public:
     // called to extract and send these notifications, so they might linger
     // and contain stale ImageContainerParent pointers.
     if (!mCompositor->GetTargetContext()) {
       mImageCompositeNotifications.AppendElement(aNotification);
     }
   }
   void ExtractImageCompositeNotifications(nsTArray<ImageCompositeNotification>* aNotifications)
   {
-    aNotifications->MoveElementsFrom(Move(mImageCompositeNotifications));
+    aNotifications->AppendElements(Move(mImageCompositeNotifications));
   }
 
 private:
   /** Region we're clipping our current drawing to. */
   nsIntRegion mClippingRegion;
   gfx::IntRect mRenderBounds;
 
   /** Current root layer. */
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -1806,17 +1806,17 @@ struct FramesWithDepth
 void FlushFramesArray(nsTArray<FramesWithDepth>& aSource, nsTArray<nsIFrame*>* aDest)
 {
   if (aSource.IsEmpty()) {
     return;
   }
   aSource.Sort();
   uint32_t length = aSource.Length();
   for (uint32_t i = 0; i < length; i++) {
-    aDest->MoveElementsFrom(Move(aSource[i].mFrames));
+    aDest->AppendElements(Move(aSource[i].mFrames));
   }
   aSource.Clear();
 }
 
 void nsDisplayList::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
                             nsDisplayItem::HitTestState* aState,
                             nsTArray<nsIFrame*> *aOutFrames) const {
   int32_t itemBufferStart = aState->mItemBuffer.Length();
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -2921,17 +2921,17 @@ protected:
   nsDisplayWrapList() {}
 
   void MergeFromTrackingMergedFrames(nsDisplayWrapList* aOther)
   {
     mList.AppendToBottom(&aOther->mList);
     mBounds.UnionRect(mBounds, aOther->mBounds);
     mVisibleRect.UnionRect(mVisibleRect, aOther->mVisibleRect);
     mMergedFrames.AppendElement(aOther->mFrame);
-    mMergedFrames.MoveElementsFrom(mozilla::Move(aOther->mMergedFrames));
+    mMergedFrames.AppendElements(mozilla::Move(aOther->mMergedFrames));
   }
 
   nsDisplayList mList;
   // The frames from items that have been merged into this item, excluding
   // this item's own frame.
   nsTArray<nsIFrame*> mMergedFrames;
   nsRect mBounds;
   // Visible rect contributed by this display item itself.
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -105,17 +105,17 @@ class nsInvalidateRequestList {
 public:
   struct Request {
     nsRect   mRect;
     uint32_t mFlags;
   };
 
   void TakeFrom(nsInvalidateRequestList* aList)
   {
-    mRequests.MoveElementsFrom(mozilla::Move(aList->mRequests));
+    mRequests.AppendElements(mozilla::Move(aList->mRequests));
   }
   bool IsEmpty() { return mRequests.IsEmpty(); }
 
   nsTArray<Request> mRequests;
 };
 
 /* Used by nsPresContext::HasAuthorSpecifiedRules */
 #define NS_AUTHOR_SPECIFIED_BACKGROUND      (1 << 0)
--- a/parser/html/nsHtml5Speculation.cpp
+++ b/parser/html/nsHtml5Speculation.cpp
@@ -25,16 +25,16 @@ nsHtml5Speculation::~nsHtml5Speculation(
 
 void
 nsHtml5Speculation::MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue)
 {
   if (mOpQueue.IsEmpty()) {
     mOpQueue.SwapElements(aOpQueue);
     return;
   }
-  mOpQueue.MoveElementsFrom(Move(aOpQueue));
+  mOpQueue.AppendElements(Move(aOpQueue));
 }
 
 void
 nsHtml5Speculation::FlushToSink(nsAHtml5TreeOpSink* aSink)
 {
   aSink->MoveOpsFrom(mOpQueue);
 }
--- a/parser/html/nsHtml5TreeOpExecutor.cpp
+++ b/parser/html/nsHtml5TreeOpExecutor.cpp
@@ -785,17 +785,17 @@ nsHtml5TreeOpExecutor::GetParser()
 void
 nsHtml5TreeOpExecutor::MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue)
 {
   NS_PRECONDITION(mFlushState == eNotFlushing, "mOpQueue modified during tree op execution.");
   if (mOpQueue.IsEmpty()) {
     mOpQueue.SwapElements(aOpQueue);
     return;
   }
-  mOpQueue.MoveElementsFrom(Move(aOpQueue));
+  mOpQueue.AppendElements(Move(aOpQueue));
 }
 
 void
 nsHtml5TreeOpExecutor::InitializeDocWriteParserState(nsAHtml5TreeBuilderState* aState, int32_t aLine)
 {
   GetParser()->InitializeDocWriteParserState(aState, aLine);
 }
 
--- a/parser/html/nsHtml5TreeOpStage.cpp
+++ b/parser/html/nsHtml5TreeOpStage.cpp
@@ -17,56 +17,56 @@ nsHtml5TreeOpStage::~nsHtml5TreeOpStage(
 
 void
 nsHtml5TreeOpStage::MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue)
 {
   mozilla::MutexAutoLock autoLock(mMutex);
   if (mOpQueue.IsEmpty()) {
     mOpQueue.SwapElements(aOpQueue);
   } else {
-    mOpQueue.MoveElementsFrom(Move(aOpQueue));
+    mOpQueue.AppendElements(Move(aOpQueue));
   }
 }
     
 void
 nsHtml5TreeOpStage::MoveOpsAndSpeculativeLoadsTo(nsTArray<nsHtml5TreeOperation>& aOpQueue,
     nsTArray<nsHtml5SpeculativeLoad>& aSpeculativeLoadQueue)
 {
   mozilla::MutexAutoLock autoLock(mMutex);
   if (aOpQueue.IsEmpty()) {
     mOpQueue.SwapElements(aOpQueue);
   } else {
-    aOpQueue.MoveElementsFrom(Move(mOpQueue));
+    aOpQueue.AppendElements(Move(mOpQueue));
   }
   if (aSpeculativeLoadQueue.IsEmpty()) {
     mSpeculativeLoadQueue.SwapElements(aSpeculativeLoadQueue);
   } else {
-    aSpeculativeLoadQueue.MoveElementsFrom(Move(mSpeculativeLoadQueue));
+    aSpeculativeLoadQueue.AppendElements(Move(mSpeculativeLoadQueue));
   }
 }
 
 void
 nsHtml5TreeOpStage::MoveSpeculativeLoadsFrom(nsTArray<nsHtml5SpeculativeLoad>& aSpeculativeLoadQueue)
 {
   mozilla::MutexAutoLock autoLock(mMutex);
   if (mSpeculativeLoadQueue.IsEmpty()) {
     mSpeculativeLoadQueue.SwapElements(aSpeculativeLoadQueue);
   } else {
-    mSpeculativeLoadQueue.MoveElementsFrom(Move(aSpeculativeLoadQueue));
+    mSpeculativeLoadQueue.AppendElements(Move(aSpeculativeLoadQueue));
   }
 }
 
 void
 nsHtml5TreeOpStage::MoveSpeculativeLoadsTo(nsTArray<nsHtml5SpeculativeLoad>& aSpeculativeLoadQueue)
 {
   mozilla::MutexAutoLock autoLock(mMutex);
   if (aSpeculativeLoadQueue.IsEmpty()) {
     mSpeculativeLoadQueue.SwapElements(aSpeculativeLoadQueue);
   } else {
-    aSpeculativeLoadQueue.MoveElementsFrom(Move(mSpeculativeLoadQueue));
+    aSpeculativeLoadQueue.AppendElements(Move(mSpeculativeLoadQueue));
   }
 }
 
 #ifdef DEBUG
 void
 nsHtml5TreeOpStage::AssertEmpty()
 {
   mozilla::MutexAutoLock autoLock(mMutex);
--- a/tools/profiler/tasktracer/GeckoTaskTracer.cpp
+++ b/tools/profiler/tasktracer/GeckoTaskTracer.cpp
@@ -199,17 +199,17 @@ TraceInfo::AppendLog()
   MutexAutoLock lock(mLogsMutex);
   return mLogs.AppendElement();
 }
 
 void
 TraceInfo::MoveLogsInto(TraceInfoLogsType& aResult)
 {
   MutexAutoLock lock(mLogsMutex);
-  aResult.MoveElementsFrom(Move(mLogs));
+  aResult.AppendElements(Move(mLogs));
 }
 
 void
 InitTaskTracer(uint32_t aFlags)
 {
   if (aFlags & FORKED_AFTER_NUWA) {
     ObsoleteCurrentTraceInfos();
     return;
--- a/xpcom/glue/nsTArray.h
+++ b/xpcom/glue/nsTArray.h
@@ -1533,16 +1533,36 @@ public:
   template<class Item, class Allocator>
   /* MOZ_WARN_UNUSED_RESULT */
   elem_type* AppendElements(const nsTArray_Impl<Item, Allocator>& aArray,
                             const mozilla::fallible_t&)
   {
     return AppendElements<Item, Allocator, FallibleAlloc>(aArray);
   }
 
+  // Move all elements from another array to the end of this array.
+  // @return A pointer to the newly appended elements, or null on OOM.
+  template<class Item, class Allocator>
+  elem_type* AppendElements(nsTArray_Impl<Item, Allocator>&& aArray)
+  {
+    MOZ_ASSERT(&aArray != this, "argument must be different aArray");
+    index_type len = Length();
+    index_type otherLen = aArray.Length();
+    if (!Alloc::Successful(this->template EnsureCapacity<Alloc>(
+          len + otherLen, sizeof(elem_type)))) {
+      return nullptr;
+    }
+    copy_type::CopyElements(Elements() + len, aArray.Elements(), otherLen,
+                            sizeof(elem_type));
+    this->IncrementLength(otherLen);
+    aArray.template ShiftData<Alloc>(0, otherLen, 0, sizeof(elem_type),
+                                     MOZ_ALIGNOF(elem_type));
+    return Elements() + len;
+  }
+
   // Append a new element, move constructing if possible.
 protected:
   template<class Item, typename ActualAlloc = Alloc>
   elem_type* AppendElement(Item&& aItem)
   {
     if (!ActualAlloc::Successful(this->template EnsureCapacity<ActualAlloc>(
           Length() + 1, sizeof(elem_type)))) {
       return nullptr;
@@ -1601,37 +1621,16 @@ protected:
 public:
 
   /* MOZ_WARN_UNUSED_RESULT */
   elem_type* AppendElement(const mozilla::fallible_t&)
   {
     return AppendElement<FallibleAlloc>();
   }
 
-  // Move all elements from another array to the end of this array without
-  // calling copy constructors or destructors.
-  // @return A pointer to the newly appended elements, or null on OOM.
-  template<class Item, class Allocator>
-  elem_type* MoveElementsFrom(nsTArray_Impl<Item, Allocator>&& aArray)
-  {
-    MOZ_ASSERT(&aArray != this, "argument must be different aArray");
-    index_type len = Length();
-    index_type otherLen = aArray.Length();
-    if (!Alloc::Successful(this->template EnsureCapacity<Alloc>(
-          len + otherLen, sizeof(elem_type)))) {
-      return nullptr;
-    }
-    copy_type::CopyElements(Elements() + len, aArray.Elements(), otherLen,
-                            sizeof(elem_type));
-    this->IncrementLength(otherLen);
-    aArray.template ShiftData<Alloc>(0, otherLen, 0, sizeof(elem_type),
-                                     MOZ_ALIGNOF(elem_type));
-    return Elements() + len;
-  }
-
   // This method removes a range of elements from this array.
   // @param aStart The starting index of the elements to remove.
   // @param aCount The number of elements to remove.
   void RemoveElementsAt(index_type aStart, size_type aCount)
   {
     MOZ_ASSERT(aCount == 0 || aStart < Length(), "Invalid aStart index");
     MOZ_ASSERT(aStart + aCount <= Length(), "Invalid length");
     // Check that the previous assert didn't overflow
@@ -2115,17 +2114,16 @@ public:
   }
 
   using base_type::AppendElement;
   using base_type::AppendElements;
   using base_type::EnsureLengthAtLeast;
   using base_type::InsertElementAt;
   using base_type::InsertElementsAt;
   using base_type::InsertElementSorted;
-  using base_type::MoveElementsFrom;
   using base_type::ReplaceElementsAt;
   using base_type::SetCapacity;
   using base_type::SetLength;
 };
 
 //
 // FallibleTArray is a fallible vector class.
 //