forked from mirrors/gecko-dev
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:
parent
789fbdb7a4
commit
18fd151a2c
3 changed files with 3 additions and 8 deletions
|
|
@ -343,8 +343,7 @@ NS_IMETHODIMP nsIDNService::IsACE(const nsACString& input, bool* _retval) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsIDNService::Normalize(const nsACString& input,
|
nsresult nsIDNService::Normalize(const nsACString& input, nsACString& output) {
|
||||||
nsACString& output) {
|
|
||||||
// protect against bogus input
|
// protect against bogus input
|
||||||
NS_ENSURE_TRUE(IsUtf8(input), NS_ERROR_UNEXPECTED);
|
NS_ENSURE_TRUE(IsUtf8(input), NS_ERROR_UNEXPECTED);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ class nsIDNService final : public nsIIDNService {
|
||||||
nsresult ACEtoUTF8(const nsACString& input, nsACString& _retval,
|
nsresult ACEtoUTF8(const nsACString& input, nsACString& _retval,
|
||||||
stringPrepFlag flag);
|
stringPrepFlag flag);
|
||||||
|
|
||||||
|
nsresult Normalize(const nsACString& input, nsACString& output);
|
||||||
|
|
||||||
void prefsChanged(const char* pref);
|
void prefsChanged(const char* pref);
|
||||||
|
|
||||||
static void PrefChanged(const char* aPref, void* aSelf) {
|
static void PrefChanged(const char* aPref, void* aSelf) {
|
||||||
|
|
|
||||||
|
|
@ -42,12 +42,6 @@ interface nsIIDNService : nsISupports
|
||||||
*/
|
*/
|
||||||
boolean isACE(in ACString input);
|
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
|
* 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
|
* whitelist, otherwise converts it to ACE. This is useful for display
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue