Bug 1709067 - LS: Remove module specific QM_TRY macros; r=dom-storage-reviewers,jstutte

Depends on D114082

Differential Revision: https://phabricator.services.mozilla.com/D114083
This commit is contained in:
Jan Varga 2021-05-03 19:44:40 +00:00
Родитель 0402c4b6e0
Коммит 5facda493a
5 изменённых файлов: 315 добавлений и 322 удалений

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

@ -139,7 +139,7 @@ mozilla::ipc::IPCResult LSObserverChild::RecvObserve(
return IPC_OK();
}
LS_TRY_INSPECT(const auto& principal,
QM_TRY_INSPECT(const auto& principal,
PrincipalInfoToPrincipal(aPrincipalInfo),
IPC_FAIL_NO_REASON(this));

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -337,7 +337,7 @@ nsresult LSObject::CreateForWindow(nsPIDOMWindowInner* aWindow,
}
#ifdef DEBUG
LS_TRY_INSPECT(
QM_TRY_INSPECT(
const auto& principalMetadata,
quota::QuotaManager::GetInfoFromPrincipal(storagePrincipal.get()));
@ -345,7 +345,7 @@ nsresult LSObject::CreateForWindow(nsPIDOMWindowInner* aWindow,
const auto& origin = principalMetadata.mOrigin;
#else
LS_TRY_INSPECT(
QM_TRY_INSPECT(
const auto& origin,
quota::QuotaManager::GetOriginFromPrincipal(storagePrincipal.get()));
#endif
@ -428,7 +428,7 @@ nsresult LSObject::CreateForPrincipal(nsPIDOMWindowInner* aWindow,
}
#ifdef DEBUG
LS_TRY_INSPECT(
QM_TRY_INSPECT(
const auto& principalMetadata,
([&storagePrincipalInfo,
&aPrincipal]() -> Result<quota::PrincipalMetadata, nsresult> {
@ -437,14 +437,14 @@ nsresult LSObject::CreateForPrincipal(nsPIDOMWindowInner* aWindow,
return quota::QuotaManager::GetInfoForChrome();
}
LS_TRY_RETURN(quota::QuotaManager::GetInfoFromPrincipal(aPrincipal));
QM_TRY_RETURN(quota::QuotaManager::GetInfoFromPrincipal(aPrincipal));
}()));
MOZ_ASSERT(originAttrSuffix == principalMetadata.mSuffix);
const auto& origin = principalMetadata.mOrigin;
#else
LS_TRY_INSPECT(
QM_TRY_INSPECT(
const auto& origin, ([&storagePrincipalInfo,
&aPrincipal]() -> Result<nsAutoCString, nsresult> {
if (storagePrincipalInfo->type() ==
@ -452,7 +452,7 @@ nsresult LSObject::CreateForPrincipal(nsPIDOMWindowInner* aWindow,
return nsAutoCString{quota::QuotaManager::GetOriginForChrome()};
}
LS_TRY_RETURN(quota::QuotaManager::GetOriginFromPrincipal(aPrincipal));
QM_TRY_RETURN(quota::QuotaManager::GetOriginFromPrincipal(aPrincipal));
}()));
#endif

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

@ -127,7 +127,7 @@ Result<std::pair<nsCString, nsCString>, nsresult> GenerateOriginKey2(
attrs.CreateSuffix(originAttrSuffix);
RefPtr<MozURL> specURL;
LS_TRY(MozURL::Init(getter_AddRefs(specURL), spec));
QM_TRY(MozURL::Init(getter_AddRefs(specURL), spec));
nsCString host(specURL->Host());
uint32_t length = host.Length();

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

@ -189,13 +189,6 @@
* interface.
*/
// XXX Replace all uses by the QM_* variants and remove these aliases
#define LS_TRY QM_TRY
#define LS_TRY_UNWRAP QM_TRY_UNWRAP
#define LS_TRY_INSPECT QM_TRY_INSPECT
#define LS_TRY_RETURN QM_TRY_RETURN
#define LS_FAIL QM_FAIL
namespace mozilla {
class LogModule;