mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1457689 - Fix documain.domain setting exception type; r=bz
Change exception type to comply with HTML spec, which uses security error instead of bad document domain. MozReview-Commit-ID: Iefkeskn9bM --HG-- extra : rebase_source : 282507d687c8fe19a326df95632694bcc6c5dd29
This commit is contained in:
parent
73c1f3e815
commit
a50b3fa9e5
@ -1019,7 +1019,7 @@ nsHTMLDocument::SetDomain(const nsAString& aDomain, ErrorResult& rv)
|
||||
}
|
||||
|
||||
if (aDomain.IsEmpty()) {
|
||||
rv.Throw(NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN);
|
||||
rv.Throw(NS_ERROR_DOM_SECURITY_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1036,7 +1036,7 @@ nsHTMLDocument::SetDomain(const nsAString& aDomain, ErrorResult& rv)
|
||||
nsCOMPtr<nsIURI> newURI = RegistrableDomainSuffixOfInternal(aDomain, uri);
|
||||
if (!newURI) {
|
||||
// Error: illegal domain
|
||||
rv.Throw(NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN);
|
||||
rv.Throw(NS_ERROR_DOM_SECURITY_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
[document_domain_setter.html]
|
||||
[failed setting of document.domain]
|
||||
expected: FAIL
|
||||
|
Loading…
Reference in New Issue
Block a user