Bug 1184293 - Don't call ThirdPartyUtil::GetBaseDomain if aUri is null. r=jduell

Return early if aUri is null so as to avoid warnings about it.
This commit is contained in:
Eric Rahm 2015-07-23 11:02:45 -07:00
Родитель 5393a24d2f
Коммит 845924eac5
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -344,6 +344,10 @@ NS_IMETHODIMP
ThirdPartyUtil::GetBaseDomain(nsIURI* aHostURI,
nsACString& aBaseDomain)
{
if (!aHostURI) {
return NS_ERROR_INVALID_ARG;
}
// Get the base domain. this will fail if the host contains a leading dot,
// more than one trailing dot, or is otherwise malformed.
nsresult rv = mTLDService->GetBaseDomain(aHostURI, 0, aBaseDomain);