gecko-dev/dom/smil
Nathan Froyd e7b3b3140d Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr. But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us). Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the
place. Additionally, if moving entries is implemented via memcpy (which
is quite common), PLDHashTable copying around bits *again* is
inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement). In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead of
   copy constructors. Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-09-20 11:20:36 -04:00
..
crashtests
test Bug 1471814 - Add a preference for {Document,Element}.getAnimations(); r=bz,hiro 2018-07-14 09:23:03 +09:00
SMILBoolType.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
SMILBoolType.h
SMILEnumType.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
SMILEnumType.h
SMILIntegerType.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
SMILIntegerType.h
SMILStringType.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
SMILStringType.h
TimeEvent.cpp
TimeEvent.h Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot 2018-06-26 17:05:01 -07:00
moz.build Bug 1458458: Move setting SMIL override values into nsDOMCSSAttrDeclaration. r=hiro 2018-05-02 18:09:05 +02:00
nsISMILAttr.h
nsISMILType.h
nsSMILAnimationController.cpp
nsSMILAnimationController.h
nsSMILAnimationFunction.cpp Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
nsSMILAnimationFunction.h
nsSMILCSSProperty.cpp Bug 1458580 - Rename GetSMILStyleOverride since it can't return null. r=emilio 2018-05-25 12:12:37 +02:00
nsSMILCSSProperty.h
nsSMILCSSValueType.cpp Bug 1450250: SMIL document-related fixes. r=heycam 2018-07-20 14:44:47 +02:00
nsSMILCSSValueType.h Bug 1458814: Remove code that is no longer called. r=hiro 2018-05-05 16:31:20 +02:00
nsSMILCompositor.cpp Bug 1479450: Implement nsCSSProps::LookupProperty using Rust. r=xidorn 2018-07-31 12:00:15 +02:00
nsSMILCompositor.h Bug 1415980 - make hash keys movable and not copyable; r=erahm 2018-09-20 11:20:36 -04:00
nsSMILCompositorTable.h
nsSMILFloatType.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
nsSMILFloatType.h
nsSMILInstanceTime.cpp
nsSMILInstanceTime.h
nsSMILInterval.cpp
nsSMILInterval.h
nsSMILKeySpline.cpp
nsSMILKeySpline.h Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan 2018-09-07 14:47:51 +00:00
nsSMILMilestone.h
nsSMILNullType.cpp Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
nsSMILNullType.h
nsSMILParserUtils.cpp Bug 1486115 - use mozilla::IsAsciiDigit and mozilla::AsciiAlphanumericToNumber r=dholbert 2018-08-31 16:55:04 +01:00
nsSMILParserUtils.h
nsSMILRepeatCount.cpp
nsSMILRepeatCount.h
nsSMILSetAnimationFunction.cpp
nsSMILSetAnimationFunction.h
nsSMILTargetIdentifier.h
nsSMILTimeContainer.cpp
nsSMILTimeContainer.h
nsSMILTimeValue.cpp
nsSMILTimeValue.h
nsSMILTimeValueSpec.cpp Bug 1486488 - Don't assume that SVGAnimationElement has a parent on bind. r=dholbert 2018-08-28 09:06:08 +00:00
nsSMILTimeValueSpec.h Bug 1486488 - Don't assume that SVGAnimationElement has a parent on bind. r=dholbert 2018-08-28 09:06:08 +00:00
nsSMILTimeValueSpecParams.h
nsSMILTimedElement.cpp Bug 1486488 - Don't assume that SVGAnimationElement has a parent on bind. r=dholbert 2018-08-28 09:06:08 +00:00
nsSMILTimedElement.h Bug 1486488 - Don't assume that SVGAnimationElement has a parent on bind. r=dholbert 2018-08-28 09:06:08 +00:00
nsSMILTypes.h
nsSMILValue.cpp Bug 1453795 - SVG - Initialize member fields in classes/ structures. r=jwatt 2018-06-16 13:54:44 +03:00
nsSMILValue.h