Bug 819475 - Make document.domain non-nullable

This commit is contained in:
janekptacijarabaci 2018-07-20 07:45:05 +02:00 committed by Roy Tam
commit d75c4a5956
2 changed files with 4 additions and 4 deletions

View file

@ -886,7 +886,7 @@ nsHTMLDocument::GetDomain(nsAString& aDomain)
nsCOMPtr<nsIURI> uri = GetDomainURI();
if (!uri) {
SetDOMStringToNull(aDomain);
aDomain.Truncate();
return NS_OK;
}
@ -896,8 +896,8 @@ nsHTMLDocument::GetDomain(nsAString& aDomain)
CopyUTF8toUTF16(hostName, aDomain);
} else {
// If we can't get the host from the URI (e.g. about:, javascript:,
// etc), just return an null string.
SetDOMStringToNull(aDomain);
// etc), just return an empty string.
aDomain.Truncate();
}
return NS_OK;
}