Bug 1261452 - do_AddRef shouldn't require an rvalue-reference. r=froydnj
authorBobby Holley <bobbyholley@gmail.com>
Fri, 01 Apr 2016 12:43:40 -0700
changeset 331253 4678a49486b3fe0a75c9a8aabc14fd4e43ec4c85
parent 331252 cb1e8b892715d0d1377caa9f80f27b2d2000f973
child 331254 6b6889e28ca674258d9dc7551e45b27f336ecd1d
push id1146
push userCallek@gmail.com
push dateMon, 25 Jul 2016 16:35:44 +0000
treeherdermozilla-release@a55778f9cd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1261452
milestone48.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 1261452 - do_AddRef shouldn't require an rvalue-reference. r=froydnj
gfx/src/nsDeviceContext.cpp
layout/base/nsCSSFrameConstructor.cpp
mfbt/RefPtr.h
--- a/gfx/src/nsDeviceContext.cpp
+++ b/gfx/src/nsDeviceContext.cpp
@@ -139,17 +139,17 @@ nsFontCache::GetMetricsFor(const nsFont&
             fm->Language() == language &&
             fm->Orientation() == aParams.orientation) {
             if (i != n) {
                 // promote it to the end of the cache
                 mFontMetrics.RemoveElementAt(i);
                 mFontMetrics.AppendElement(fm);
             }
             fm->GetThebesFontGroup()->UpdateUserFonts();
-            return do_AddRef(Move(fm));
+            return do_AddRef(fm);
         }
     }
 
     // It's not in the cache. Get font metrics and then cache them.
 
     nsFontMetrics::Params params = aParams;
     params.language = language;
     RefPtr<nsFontMetrics> fm = new nsFontMetrics(aFont, params, mContext);
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -2361,17 +2361,17 @@ nsCSSFrameConstructor::ConstructDocEleme
 
   SetUpDocElementContainingBlock(aDocElement);
 
   NS_ASSERTION(mDocElementContainingBlock, "Should have parent by now");
 
   nsFrameConstructorState state(mPresShell,
                                 GetAbsoluteContainingBlock(mDocElementContainingBlock, FIXED_POS),
                                 nullptr,
-                                nullptr, do_AddRef(Move(aFrameState)));
+                                nullptr, do_AddRef(aFrameState));
   // Initialize the ancestor filter with null for now; we'll push
   // aDocElement once we finish resolving style for it.
   state.mTreeMatchContext.InitAncestors(nullptr);
 
   // XXXbz why, exactly?
   if (!mTempFrameTreeState)
     state.mPresShell->CaptureHistoryState(getter_AddRefs(mTempFrameTreeState));
 
@@ -7774,17 +7774,17 @@ nsCSSFrameConstructor::ContentRangeInser
     LAYOUT_PHASE_TEMP_REENTER();
     return rv;
   }
 
   nsFrameConstructorState state(mPresShell,
                                 GetAbsoluteContainingBlock(insertion.mParentFrame, FIXED_POS),
                                 GetAbsoluteContainingBlock(insertion.mParentFrame, ABS_POS),
                                 GetFloatContainingBlock(insertion.mParentFrame),
-                                do_AddRef(Move(aFrameState)));
+                                do_AddRef(aFrameState));
   state.mTreeMatchContext.InitAncestors(aContainer ?
                                           aContainer->AsElement() :
                                           nullptr);
 
   // Recover state for the containing block - we need to know if
   // it has :first-letter or :first-line style applied to it. The
   // reason we care is that the internal structure in these cases
   // is not the normal structure and requires custom updating
--- a/mfbt/RefPtr.h
+++ b/mfbt/RefPtr.h
@@ -591,17 +591,17 @@ operator!=(decltype(nullptr), const RefP
 {
   return nullptr != aRhs.get();
 }
 
 /*****************************************************************************/
 
 template <class T>
 inline already_AddRefed<T>
-do_AddRef(T*&& aObj)
+do_AddRef(T* aObj)
 {
   RefPtr<T> ref(aObj);
   return ref.forget();
 }
 
 namespace mozilla {
 
 /**