Bug 1311277 Part 3 - Use LinkedList's move assignment in FCItemIterator::AppendItemsToList. r=froydnj
authorTing-Yu Lin <tlin@mozilla.com>
Wed, 19 Oct 2016 13:56:12 +0800
changeset 318941 d6bd5ef77aebdab96355e022bf6ff1fefbf20ddf
parent 318940 ba5d30bdad0d84ae6e1809a5946ea136a92dad44
child 318942 2626096d67040cd7a49fb5347147157c0965d5ed
push id30855
push userryanvm@gmail.com
push dateFri, 21 Oct 2016 21:12:44 +0000
treeherdermozilla-central@5639a9f476d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1311277
milestone52.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 1311277 Part 3 - Use LinkedList's move assignment in FCItemIterator::AppendItemsToList. r=froydnj MozReview-Commit-ID: LLF519q9gcG
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -12808,21 +12808,17 @@ Iterator::AppendItemsToList(const Iterat
       !aTargetList.mUndisplayedItems.IsEmpty()) {
     do {
       AppendItemToList(aTargetList);
     } while (*this != aEnd);
     return;
   }
 
   // Move our entire list of items into the empty target list.
-  // XXX: If LinkedList supports move assignment, we could use
-  // aTargetList.mItems = Move(mList.mItems);
-  aTargetList.mItems.~LinkedList<FrameConstructionItem>();
-  new (&aTargetList.mItems) LinkedList<FrameConstructionItem>(
-    Move(mList.mItems));
+  aTargetList.mItems = Move(mList.mItems);
 
   // Copy over the various counters
   aTargetList.mInlineCount = mList.mInlineCount;
   aTargetList.mBlockCount = mList.mBlockCount;
   aTargetList.mLineParticipantCount = mList.mLineParticipantCount;
   aTargetList.mItemCount = mList.mItemCount;
   memcpy(aTargetList.mDesiredParentCounts, mList.mDesiredParentCounts,
          sizeof(aTargetList.mDesiredParentCounts));