Bug 1881029 - Stop exposing nsIIDNService::normalize() as a public method. r=valentin,necko-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D202227
This commit is contained in:
Henri Sivonen 2024-02-21 11:54:10 +00:00
Родитель 789fbdb7a4
Коммит 18fd151a2c
3 изменённых файлов: 3 добавлений и 8 удалений

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

@ -343,8 +343,7 @@ NS_IMETHODIMP nsIDNService::IsACE(const nsACString& input, bool* _retval) {
return NS_OK;
}
NS_IMETHODIMP nsIDNService::Normalize(const nsACString& input,
nsACString& output) {
nsresult nsIDNService::Normalize(const nsACString& input, nsACString& output) {
// protect against bogus input
NS_ENSURE_TRUE(IsUtf8(input), NS_ERROR_UNEXPECTED);

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

@ -98,6 +98,8 @@ class nsIDNService final : public nsIIDNService {
nsresult ACEtoUTF8(const nsACString& input, nsACString& _retval,
stringPrepFlag flag);
nsresult Normalize(const nsACString& input, nsACString& output);
void prefsChanged(const char* pref);
static void PrefChanged(const char* aPref, void* aSelf) {

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

@ -42,12 +42,6 @@ interface nsIIDNService : nsISupports
*/
boolean isACE(in ACString input);
/**
* Performs the unicode normalization needed for hostnames in IDN,
* for callers that want early normalization.
*/
AUTF8String normalize(in AUTF8String input);
/**
* Normalizes and converts a host to UTF-8 if the host is in the IDN
* whitelist, otherwise converts it to ACE. This is useful for display