зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1801364 - Add a way to infallibly convert Client::Type to nsString; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D166092
This commit is contained in:
Родитель
c7482fd8af
Коммит
ddae862344
|
@ -211,6 +211,15 @@ bool Client::TypeToText(Type aType, nsAString& aText, const fallible_t&) {
|
|||
return true;
|
||||
}
|
||||
|
||||
// static
|
||||
nsAutoString Client::TypeToString(Type aType) {
|
||||
nsAutoString res;
|
||||
if (!TypeTo_impl(aType, res)) {
|
||||
BadType();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
// static
|
||||
nsAutoCString Client::TypeToText(Type aType) {
|
||||
nsAutoCString res;
|
||||
|
|
|
@ -82,6 +82,9 @@ class Client {
|
|||
|
||||
static bool TypeToText(Type aType, nsAString& aText, const fallible_t&);
|
||||
|
||||
// TODO: Rename other similar methods to use String/CString instead of Text.
|
||||
static nsAutoString TypeToString(Type aType);
|
||||
|
||||
static nsAutoCString TypeToText(Type aType);
|
||||
|
||||
static bool TypeFromText(const nsAString& aText, Type& aType,
|
||||
|
|
Загрузка…
Ссылка в новой задаче