Bug 1544216 Part 5 - add noexcept to move constructors and reassignment operators r=birtles
authorlongsonr <longsonr@gmail.com>
Wed, 24 Apr 2019 21:39:47 +0100
changeset 530088 2d2c69004a2958bb798a558fe86b3afc07a69e73
parent 530087 abd3b11a17de82df681fabe339ca33ae7ab65ff4
child 530089 3638ca566d8832c2dee2d273d2a34adb54be521e
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1544216
milestone68.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 1544216 Part 5 - add noexcept to move constructors and reassignment operators r=birtles
dom/smil/SMILCompositor.h
dom/smil/SMILValue.cpp
dom/smil/SMILValue.h
--- a/dom/smil/SMILCompositor.h
+++ b/dom/smil/SMILCompositor.h
@@ -28,17 +28,17 @@ namespace mozilla {
 class SMILCompositor : public PLDHashEntryHdr {
  public:
   typedef SMILTargetIdentifier KeyType;
   typedef const KeyType& KeyTypeRef;
   typedef const KeyType* KeyTypePointer;
 
   explicit SMILCompositor(KeyTypePointer aKey)
       : mKey(*aKey), mForceCompositing(false) {}
-  SMILCompositor(SMILCompositor&& toMove)
+  SMILCompositor(SMILCompositor&& toMove) noexcept
       : PLDHashEntryHdr(std::move(toMove)),
         mKey(std::move(toMove.mKey)),
         mAnimationFunctions(std::move(toMove.mAnimationFunctions)),
         mForceCompositing(false) {}
 
   // PLDHashEntryHdr methods
   KeyTypeRef GetKey() const { return mKey; }
   bool KeyEquals(KeyTypePointer aKey) const;
--- a/dom/smil/SMILValue.cpp
+++ b/dom/smil/SMILValue.cpp
@@ -37,26 +37,26 @@ const SMILValue& SMILValue::operator=(co
   }
 
   mType->Assign(*this, aVal);
 
   return *this;
 }
 
 // Move constructor / reassignment operator:
-SMILValue::SMILValue(SMILValue&& aVal)
+SMILValue::SMILValue(SMILValue&& aVal) noexcept
     : mU(aVal.mU),  // Copying union is only OK because we clear aVal.mType
                     // below.
       mType(aVal.mType) {
   // Leave aVal with a null type, so that it's safely destructible (and won't
   // mess with anything referenced by its union, which we've copied).
   aVal.mType = SMILNullType::Singleton();
 }
 
-SMILValue& SMILValue::operator=(SMILValue&& aVal) {
+SMILValue& SMILValue::operator=(SMILValue&& aVal) noexcept {
   if (!IsNull()) {
     // Clean up any data we're currently tracking.
     DestroyAndCheckPostcondition();
   }
 
   // Copy the union (which could include a pointer to external memory) & mType:
   mU = aVal.mU;
   mType = aVal.mType;
--- a/dom/smil/SMILValue.h
+++ b/dom/smil/SMILValue.h
@@ -27,18 +27,18 @@ class SMILValue {
   explicit SMILValue(const SMILType* aType);
   SMILValue(const SMILValue& aVal);
 
   ~SMILValue() { mType->Destroy(*this); }
 
   const SMILValue& operator=(const SMILValue& aVal);
 
   // Move constructor / reassignment operator:
-  SMILValue(SMILValue&& aVal);
-  SMILValue& operator=(SMILValue&& aVal);
+  SMILValue(SMILValue&& aVal) noexcept;
+  SMILValue& operator=(SMILValue&& aVal) noexcept;
 
   // Equality operators. These are allowed to be conservative (return false
   // more than you'd expect) - see comment above SMILType::IsEqual.
   bool operator==(const SMILValue& aVal) const;
   bool operator!=(const SMILValue& aVal) const { return !(*this == aVal); }
 
   bool IsNull() const { return (mType == SMILNullType::Singleton()); }