summaryrefslogtreecommitdiffstats
path: root/dom/media/MediaData.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 18:34:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 18:34:58 +0000
commit1d5bb90cb0a1b457570019845fed207faed67a99 (patch)
treed95f8ea0fb9c9c4eb9ae55c70faa2bc02a7bcea4 /dom/media/MediaData.h
parentAdding upstream version 115.9.1esr. (diff)
downloadfirefox-esr-647942fa887222a841bec4bfb10ffec54eb7ef2f.tar.xz
firefox-esr-647942fa887222a841bec4bfb10ffec54eb7ef2f.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;
}