Backed out changeset 21a7cf38f15a (bug 1725227) for causing multiple failures. CLOSED TREE

This commit is contained in:
Iulian Moraru 2021-08-12 12:21:05 +03:00
parent cca4bb13f7
commit c4ff1ff63e

View File

@ -91,10 +91,6 @@ static void PopulateTopLevelInfoFromURI(const bool aIsTopLevelDocument,
return;
}
int32_t port;
rv = aURI->GetPort(&port);
NS_ENSURE_SUCCESS_VOID(rv);
nsCOMPtr<nsIEffectiveTLDService> tldService =
do_GetService(NS_EFFECTIVETLDSERVICE_CONTRACTID);
MOZ_ASSERT(tldService);
@ -103,7 +99,7 @@ static void PopulateTopLevelInfoFromURI(const bool aIsTopLevelDocument,
nsAutoCString baseDomain;
rv = tldService->GetBaseDomain(aURI, 0, baseDomain);
if (NS_SUCCEEDED(rv)) {
MakeTopLevelInfo(scheme, baseDomain, port, aUseSite, topLevelInfo);
MakeTopLevelInfo(scheme, baseDomain, aUseSite, topLevelInfo);
return;
}
@ -111,6 +107,10 @@ static void PopulateTopLevelInfoFromURI(const bool aIsTopLevelDocument,
bool isIpAddress = (rv == NS_ERROR_HOST_IS_IP_ADDRESS);
bool isInsufficientDomainLevels = (rv == NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS);
int32_t port;
rv = aURI->GetPort(&port);
NS_ENSURE_SUCCESS_VOID(rv);
nsAutoCString host;
rv = aURI->GetHost(host);
NS_ENSURE_SUCCESS_VOID(rv);