Bug 1626570 - Improve handling of copying arrays in dom/smil/. r=birtles

Differential Revision: https://phabricator.services.mozilla.com/D73630
This commit is contained in:
Simon Giesecke 2020-05-05 13:00:31 +00:00
parent 53e4e4c078
commit e1c9ec0e18
2 changed files with 4 additions and 3 deletions

View File

@ -33,7 +33,8 @@ using namespace mozilla::dom;
namespace mozilla { namespace mozilla {
typedef AutoTArray<RefPtr<RawServoAnimationValue>, 1> ServoAnimationValues; typedef CopyableAutoTArray<RefPtr<RawServoAnimationValue>, 1>
ServoAnimationValues;
/*static*/ /*static*/
SMILCSSValueType SMILCSSValueType::sSingleton; SMILCSSValueType SMILCSSValueType::sSingleton;
@ -48,7 +49,7 @@ struct ValueWrapper {
const RefPtr<RawServoAnimationValue>& aValue) const RefPtr<RawServoAnimationValue>& aValue)
: mPropID(aPropID), mServoValues{(aValue)} {} : mPropID(aPropID), mServoValues{(aValue)} {}
ValueWrapper(nsCSSPropertyID aPropID, ServoAnimationValues&& aValues) ValueWrapper(nsCSSPropertyID aPropID, ServoAnimationValues&& aValues)
: mPropID(aPropID), mServoValues{aValues} {} : mPropID(aPropID), mServoValues{std::move(aValues)} {}
bool operator==(const ValueWrapper& aOther) const { bool operator==(const ValueWrapper& aOther) const {
if (mPropID != aOther.mPropID) { if (mPropID != aOther.mPropID) {

View File

@ -118,7 +118,7 @@ void SMILInterval::RemoveDependentTime(const SMILInstanceTime& aTime) {
} }
void SMILInterval::GetDependentTimes(InstanceTimeList& aTimes) { void SMILInterval::GetDependentTimes(InstanceTimeList& aTimes) {
aTimes = mDependentTimes; aTimes = mDependentTimes.Clone();
} }
bool SMILInterval::IsDependencyChainLink() const { bool SMILInterval::IsDependencyChainLink() const {