summaryrefslogtreecommitdiffstats
path: root/dom/base/MimeType.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /dom/base/MimeType.cpp
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/base/MimeType.cpp')
-rw-r--r--dom/base/MimeType.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/dom/base/MimeType.cpp b/dom/base/MimeType.cpp
index c5869b1d8a..da61489c1f 100644
--- a/dom/base/MimeType.cpp
+++ b/dom/base/MimeType.cpp
@@ -9,8 +9,8 @@
#include "nsUnicharUtils.h"
template <typename char_type>
-/* static */ mozilla::UniquePtr<TMimeType<char_type>>
-TMimeType<char_type>::Parse(const nsTSubstring<char_type>& aMimeType) {
+/* static */ RefPtr<TMimeType<char_type>> TMimeType<char_type>::Parse(
+ const nsTSubstring<char_type>& aMimeType) {
// See https://mimesniff.spec.whatwg.org/#parsing-a-mime-type
// Steps 1-2
@@ -85,8 +85,8 @@ TMimeType<char_type>::Parse(const nsTSubstring<char_type>& aMimeType) {
for (const char_type* c = subtypeStart; c < subtypeEnd; ++c) {
subtype.Append(ToLowerCaseASCII(*c));
}
- mozilla::UniquePtr<TMimeType<char_type>> mimeType(
- mozilla::MakeUnique<TMimeType<char_type>>(type, subtype));
+ RefPtr<TMimeType<char_type>> mimeType =
+ new TMimeType<char_type>(type, subtype);
// Step 11
while (pos < end) {
@@ -274,7 +274,7 @@ template <typename char_type>
static char_type kCHARSET[] = {'c', 'h', 'a', 'r', 's', 'e', 't'};
static nsTDependentSubstring<char_type> kCharset(kCHARSET, 7);
- mozilla::UniquePtr<TMimeType<char_type>> parsed;
+ RefPtr<TMimeType<char_type>> parsed;
nsTAutoString<char_type> prevContentType;
nsTAutoString<char_type> prevCharset;
@@ -398,9 +398,9 @@ void TMimeType<char_type>::SetParameterValue(
});
}
-template mozilla::UniquePtr<TMimeType<char16_t>> TMimeType<char16_t>::Parse(
+template RefPtr<TMimeType<char16_t>> TMimeType<char16_t>::Parse(
const nsTSubstring<char16_t>& aMimeType);
-template mozilla::UniquePtr<TMimeType<char>> TMimeType<char>::Parse(
+template RefPtr<TMimeType<char>> TMimeType<char>::Parse(
const nsTSubstring<char>& aMimeType);
template bool TMimeType<char16_t>::Parse(
const nsTSubstring<char16_t>& aMimeType,