mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-09-30 03:22:48 +00:00
37 lines
1.7 KiB
Diff
37 lines
1.7 KiB
Diff
Bug 1849070 - Avoid using char_traits<unsigned char>. r=spidermonkey-reviewers,anba
|
|
|
|
It is not guaranteed to exist by the standard, and is actively being
|
|
removed from libc++ in LLVM 18.
|
|
|
|
Differential Revision: https://phabricator.services.mozilla.com/D186421
|
|
|
|
Upstream-Status: Backport [https://hg.mozilla.org/mozilla-central/rev/68ff4d3f7338248b4d67cf03aade5a73f8d396b2]
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
|
|
--- a/js/src/builtin/intl/Locale.cpp
|
|
+++ b/js/src/builtin/intl/Locale.cpp
|
|
@@ -802,8 +802,10 @@ static inline auto FindUnicodeExtensionT
|
|
UnicodeKey key) {
|
|
JS::AutoCheckCannotGC nogc;
|
|
return unicodeExtension->hasLatin1Chars()
|
|
- ? FindUnicodeExtensionType(unicodeExtension->latin1Chars(nogc),
|
|
- unicodeExtension->length(), key)
|
|
+ ? FindUnicodeExtensionType(
|
|
+ reinterpret_cast<const char*>(
|
|
+ unicodeExtension->latin1Chars(nogc)),
|
|
+ unicodeExtension->length(), key)
|
|
: FindUnicodeExtensionType(unicodeExtension->twoByteChars(nogc),
|
|
unicodeExtension->length(), key);
|
|
}
|
|
@@ -920,7 +922,9 @@ static BaseNamePartsResult BaseNameParts
|
|
static inline auto BaseNameParts(JSLinearString* baseName) {
|
|
JS::AutoCheckCannotGC nogc;
|
|
return baseName->hasLatin1Chars()
|
|
- ? BaseNameParts(baseName->latin1Chars(nogc), baseName->length())
|
|
+ ? BaseNameParts(
|
|
+ reinterpret_cast<const char*>(baseName->latin1Chars(nogc)),
|
|
+ baseName->length())
|
|
: BaseNameParts(baseName->twoByteChars(nogc), baseName->length());
|
|
}
|
|
|