diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /dom/file | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/file')
-rw-r--r-- | dom/file/BaseBlobImpl.h | 10 | ||||
-rw-r--r-- | dom/file/Blob.cpp | 3 | ||||
-rw-r--r-- | dom/file/FileReaderSync.cpp | 3 |
3 files changed, 8 insertions, 8 deletions
diff --git a/dom/file/BaseBlobImpl.h b/dom/file/BaseBlobImpl.h index 7265fc2104..860421c56a 100644 --- a/dom/file/BaseBlobImpl.h +++ b/dom/file/BaseBlobImpl.h @@ -8,6 +8,7 @@ #define mozilla_dom_BaseBlobImpl_h #include "nsIGlobalObject.h" +#include "mozilla/dom/Blob.h" #include "mozilla/dom/BlobImpl.h" #include "mozilla/ErrorResult.h" @@ -29,8 +30,7 @@ class BaseBlobImpl : public BlobImpl { mLength(aLength), mSerialNumber(NextSerialNumber()), mLastModificationDate(aLastModifiedDate) { - // Ensure non-null mContentType by default - mContentType.SetIsVoid(false); + dom::Blob::MakeValidBlobType(mContentType); } // Blob constructor without starting point. @@ -41,8 +41,7 @@ class BaseBlobImpl : public BlobImpl { mLength(aLength), mSerialNumber(NextSerialNumber()), mLastModificationDate(0) { - // Ensure non-null mContentType by default - mContentType.SetIsVoid(false); + dom::Blob::MakeValidBlobType(mContentType); } // Blob constructor with starting point. @@ -53,8 +52,7 @@ class BaseBlobImpl : public BlobImpl { mLength(aLength), mSerialNumber(NextSerialNumber()), mLastModificationDate(0) { - // Ensure non-null mContentType by default - mContentType.SetIsVoid(false); + dom::Blob::MakeValidBlobType(mContentType); } void GetName(nsAString& aName) const override; diff --git a/dom/file/Blob.cpp b/dom/file/Blob.cpp index 868e501ef9..b3a83d6f0f 100644 --- a/dom/file/Blob.cpp +++ b/dom/file/Blob.cpp @@ -50,6 +50,9 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(Blob) NS_IMPL_CYCLE_COLLECTING_RELEASE(Blob) void Blob::MakeValidBlobType(nsAString& aType) { + // Ensure non-null content type by default + aType.SetIsVoid(false); + char16_t* iter = aType.BeginWriting(); char16_t* end = aType.EndWriting(); diff --git a/dom/file/FileReaderSync.cpp b/dom/file/FileReaderSync.cpp index 04e5325ea3..431d7b7b71 100644 --- a/dom/file/FileReaderSync.cpp +++ b/dom/file/FileReaderSync.cpp @@ -315,8 +315,7 @@ class ReadReadyRunnable final : public WorkerSyncRunnable { public: ReadReadyRunnable(WorkerPrivate* aWorkerPrivate, nsIEventTarget* aSyncLoopTarget) - : WorkerSyncRunnable(aWorkerPrivate, aSyncLoopTarget, - "ReadReadyRunnable") {} + : WorkerSyncRunnable(aSyncLoopTarget, "ReadReadyRunnable") {} bool WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override { aWorkerPrivate->AssertIsOnWorkerThread(); |