Bug 1696666 - Part 1: Remove AtomizeWTF8Chars and JS::WTF8CharsToNewTwoByteCharsZ functions. r=tcampbell

Neither of two functions are called anymore anywhere.

Differential Revision: https://phabricator.services.mozilla.com/D107337
This commit is contained in:
André Bargull 2021-03-06 22:00:12 +00:00
Родитель 82dd844b5b
Коммит b619ae69a8
4 изменённых файлов: 0 добавлений и 29 удалений

Просмотреть файл

@ -267,13 +267,6 @@ extern JS_PUBLIC_API TwoByteCharsZ
UTF8CharsToNewTwoByteCharsZ(JSContext* cx, const UTF8Chars utf8, size_t* outlen,
arena_id_t destArenaId);
/*
* Like UTF8CharsToNewTwoByteCharsZ, but for WTF8Chars.
*/
extern JS_PUBLIC_API TwoByteCharsZ
WTF8CharsToNewTwoByteCharsZ(JSContext* cx, const WTF8Chars wtf8, size_t* outlen,
arena_id_t destArenaId);
/*
* Like UTF8CharsToNewTwoByteCharsZ, but for ConstUTF8CharsZ.
*/

Просмотреть файл

@ -433,14 +433,6 @@ TwoByteCharsZ JS::UTF8CharsToNewTwoByteCharsZ(JSContext* cx,
cx, utf8, outlen, destArenaId);
}
TwoByteCharsZ JS::WTF8CharsToNewTwoByteCharsZ(JSContext* cx,
const WTF8Chars wtf8,
size_t* outlen,
arena_id_t destArenaId) {
return InflateUTF8StringHelper<OnUTF8Error::Throw, TwoByteCharsZ>(
cx, wtf8, outlen, destArenaId);
}
TwoByteCharsZ JS::UTF8CharsToNewTwoByteCharsZ(JSContext* cx,
const ConstUTF8CharsZ& utf8,
size_t* outlen,

Просмотреть файл

@ -1175,11 +1175,6 @@ JSAtom* js::AtomizeUTF8Chars(JSContext* cx, const char* utf8Chars,
return AtomizeUTF8OrWTF8Chars<JS::UTF8Chars>(cx, utf8Chars, utf8ByteLength);
}
JSAtom* js::AtomizeWTF8Chars(JSContext* cx, const char* wtf8Chars,
size_t wtf8ByteLength) {
return AtomizeUTF8OrWTF8Chars<JS::WTF8Chars>(cx, wtf8Chars, wtf8ByteLength);
}
bool js::IndexToIdSlow(JSContext* cx, uint32_t index, MutableHandleId idp) {
MOZ_ASSERT(index > JSID_INT_MAX);

Просмотреть файл

@ -68,15 +68,6 @@ extern JSAtom* AtomizeChars(JSContext* cx, mozilla::HashNumber hash,
extern JSAtom* AtomizeUTF8Chars(JSContext* cx, const char* utf8Chars,
size_t utf8ByteLength);
/**
* Create an atom whose contents are those of the |wtf8ByteLength| code units
* starting at |wtf8Chars|, interpreted as WTF-8.
*
* Throws if the code units do not contain valid WTF-8.
*/
extern JSAtom* AtomizeWTF8Chars(JSContext* cx, const char* wtf8Chars,
size_t wtf8ByteLength);
extern JSAtom* AtomizeString(JSContext* cx, JSString* str,
js::PinningBehavior pin = js::DoNotPinAtom);