summaryrefslogtreecommitdiffstats
path: root/dom/media/MediaData.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:40:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:40:47 +0000
commit46db793222dee55d0b846c6ba99a39e2d969c52a (patch)
treed95f8ea0fb9c9c4eb9ae55c70faa2bc02a7bcea4 /dom/media/MediaData.h
parentAdding upstream version 115.9.1esr. (diff)
downloadfirefox-esr-fb0765a9732bca187483673056f480ef2e2f8c58.tar.xz
firefox-esr-fb0765a9732bca187483673056f480ef2e2f8c58.zip
Adding upstream version 115.10.0esr.upstream/115.10.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/MediaData.h')
-rw-r--r--dom/media/MediaData.h12
1 files changed, 10 insertions, 2 deletions
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;
}