зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1672369
- Change infallible TypeToText to use a return value and remove unused variant. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D94319
This commit is contained in:
Родитель
257530e1da
Коммит
f0fab90073
|
@ -3053,13 +3053,10 @@ void DirectoryLockImpl::Log() const {
|
|||
}
|
||||
QM_LOG((" mOriginScope: %s", originScope.get()));
|
||||
|
||||
nsString clientType;
|
||||
if (mClientType.IsNull()) {
|
||||
clientType.AssignLiteral("null");
|
||||
} else {
|
||||
Client::TypeToText(mClientType.Value(), clientType);
|
||||
}
|
||||
QM_LOG((" mClientType: %s", NS_ConvertUTF16toUTF8(clientType).get()));
|
||||
const auto clientType = mClientType.IsNull()
|
||||
? nsAutoCString{"null"_ns}
|
||||
: Client::TypeToText(mClientType.Value());
|
||||
QM_LOG((" mClientType: %s", clientType.get()));
|
||||
|
||||
nsCString blockedOnString;
|
||||
for (auto blockedOn : mBlockedOn) {
|
||||
|
|
|
@ -204,17 +204,12 @@ bool Client::TypeToText(Type aType, nsAString& aText, const fallible_t&) {
|
|||
}
|
||||
|
||||
// static
|
||||
void Client::TypeToText(Type aType, nsAString& aText) {
|
||||
if (!TypeTo_impl(aType, aText)) {
|
||||
BadType();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void Client::TypeToText(Type aType, nsACString& aText) {
|
||||
if (!TypeTo_impl(aType, aText)) {
|
||||
nsAutoCString Client::TypeToText(Type aType) {
|
||||
nsAutoCString res;
|
||||
if (!TypeTo_impl(aType, res)) {
|
||||
BadType();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -276,8 +271,7 @@ void Client::ShutdownWorkThreads() {
|
|||
|
||||
MOZ_DIAGNOSTIC_ASSERT(!quotaClient->IsShutdownCompleted());
|
||||
|
||||
nsAutoCString type;
|
||||
TypeToText(quotaClient->GetType(), type);
|
||||
const auto type = TypeToText(quotaClient->GetType());
|
||||
|
||||
CrashReporter::AnnotateCrashReport(
|
||||
CrashReporter::Annotation::QuotaManagerShutdownTimeout,
|
||||
|
|
|
@ -68,9 +68,7 @@ class Client {
|
|||
|
||||
static bool TypeToText(Type aType, nsAString& aText, const fallible_t&);
|
||||
|
||||
static void TypeToText(Type aType, nsAString& aText);
|
||||
|
||||
static void TypeToText(Type aType, nsACString& aText);
|
||||
static nsAutoCString TypeToText(Type aType);
|
||||
|
||||
static bool TypeFromText(const nsAString& aText, Type& aType,
|
||||
const fallible_t&);
|
||||
|
|
Загрузка…
Ссылка в новой задаче