From 1d5bb90cb0a1b457570019845fed207faed67a99 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 20:34:58 +0200 Subject: Adding upstream version 115.10.0esr. Signed-off-by: Daniel Baumann --- dom/media/MediaData.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'dom/media/MediaData.h') diff --git a/dom/media/MediaData.h b/dom/media/MediaData.h index 4040f368ba..6b7e0ff84d 100644 --- a/dom/media/MediaData.h +++ b/dom/media/MediaData.h @@ -94,8 +94,16 @@ class AlignedBuffer { } AlignedBuffer& operator=(AlignedBuffer&& aOther) { - this->~AlignedBuffer(); - new (this) AlignedBuffer(std::move(aOther)); + if (&aOther == this) { + return *this; + } + mData = aOther.mData; + mLength = aOther.mLength; + mBuffer = std::move(aOther.mBuffer); + mCapacity = aOther.mCapacity; + aOther.mData = nullptr; + aOther.mLength = 0; + aOther.mCapacity = 0; return *this; } -- cgit v1.2.3