diff --git a/accessible/atk/nsMaiInterfaceText.cpp b/accessible/atk/nsMaiInterfaceText.cpp index be8ac2b26180..d8c162855343 100644 --- a/accessible/atk/nsMaiInterfaceText.cpp +++ b/accessible/atk/nsMaiInterfaceText.cpp @@ -129,7 +129,7 @@ ConvertTexttoAsterisks(AccessibleWrap* accWrap, nsAString& aString) // convert each char to "*" when it's "password text" if (accWrap->NativeRole() == roles::PASSWORD_TEXT) { for (uint32_t i = 0; i < aString.Length(); i++) - aString.Replace(i, 1, NS_LITERAL_STRING("*")); + aString.ReplaceLiteral(i, 1, u"*"); } } diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 47da75e1a596..cd11cab526e5 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -11954,7 +11954,7 @@ nsGlobalWindow::ShowSlowScriptDialog(const nsString& aAddonId) } // Insert U+2026 HORIZONTAL ELLIPSIS - filenameUTF16.Replace(cutStart, cutLength, NS_LITERAL_STRING(u"\x2026")); + filenameUTF16.ReplaceLiteral(cutStart, cutLength, u"\x2026"); } const char16_t *formatParams[] = { filenameUTF16.get() }; rv = nsContentUtils::FormatLocalizedString(nsContentUtils::eDOM_PROPERTIES, diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp index c2e58ed0124b..80b11500f8c1 100644 --- a/dom/html/HTMLInputElement.cpp +++ b/dom/html/HTMLInputElement.cpp @@ -5422,7 +5422,7 @@ HTMLInputElement::NormalizeDateTimeLocal(nsAString& aValue) const // Use 'T' as the separator between date string and time string. int32_t sepIndex = aValue.FindChar(' '); if (sepIndex != -1) { - aValue.Replace(sepIndex, 1, NS_LITERAL_STRING("T")); + aValue.ReplaceLiteral(sepIndex, 1, u"T"); } else { sepIndex = aValue.FindChar('T'); } diff --git a/intl/locale/windows/OSPreferences_win.cpp b/intl/locale/windows/OSPreferences_win.cpp index 147767c66eeb..2da7a300bf15 100644 --- a/intl/locale/windows/OSPreferences_win.cpp +++ b/intl/locale/windows/OSPreferences_win.cpp @@ -209,9 +209,9 @@ OSPreferences::ReadDateTimePattern(DateTimeFormatStyle aDateStyle, start = str->BeginReading(pos); str->EndReading(end); if (FindInReadable(NS_LITERAL_STRING("dddd"), pos, end)) { - str->Replace(pos - start, 4, NS_LITERAL_STRING("EEEE")); + str->ReplaceLiteral(pos - start, 4, u"EEEE"); } else if (FindInReadable(NS_LITERAL_STRING("ddd"), pos, end)) { - str->Replace(pos - start, 3, NS_LITERAL_STRING("EEE")); + str->ReplaceLiteral(pos - start, 3, u"EEE"); } // Also, Windows uses lowercase "g" or "gg" for era, but ICU wants uppercase "G" diff --git a/netwerk/dns/nsIDNService.cpp b/netwerk/dns/nsIDNService.cpp index 07fecca1b3a8..ba916e841e11 100644 --- a/netwerk/dns/nsIDNService.cpp +++ b/netwerk/dns/nsIDNService.cpp @@ -653,7 +653,7 @@ void nsIDNService::normalizeFullStops(nsAString& s) case 0x3002: case 0xFF0E: case 0xFF61: - s.Replace(index, 1, NS_LITERAL_STRING(".")); + s.ReplaceLiteral(index, 1, u"."); break; default: break; diff --git a/toolkit/crashreporter/nsExceptionHandler.cpp b/toolkit/crashreporter/nsExceptionHandler.cpp index 13c260840de5..e1163cada7b2 100644 --- a/toolkit/crashreporter/nsExceptionHandler.cpp +++ b/toolkit/crashreporter/nsExceptionHandler.cpp @@ -3047,7 +3047,7 @@ bool GetIDFromMinidump(nsIFile* minidump, nsAString& id) { if (minidump && NS_SUCCEEDED(minidump->GetLeafName(id))) { - id.Replace(id.Length() - 4, 4, NS_LITERAL_STRING("")); + id.ReplaceLiteral(id.Length() - 4, 4, u""); return true; } return false;