mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-27 01:27:30 +09:00
Bug 819475 - Make document.domain non-nullable
This commit is contained in:
parent
cbb7e5262c
commit
d75c4a5956
2 changed files with 4 additions and 4 deletions
|
|
@ -886,7 +886,7 @@ nsHTMLDocument::GetDomain(nsAString& aDomain)
|
||||||
nsCOMPtr<nsIURI> uri = GetDomainURI();
|
nsCOMPtr<nsIURI> uri = GetDomainURI();
|
||||||
|
|
||||||
if (!uri) {
|
if (!uri) {
|
||||||
SetDOMStringToNull(aDomain);
|
aDomain.Truncate();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -896,8 +896,8 @@ nsHTMLDocument::GetDomain(nsAString& aDomain)
|
||||||
CopyUTF8toUTF16(hostName, aDomain);
|
CopyUTF8toUTF16(hostName, aDomain);
|
||||||
} else {
|
} else {
|
||||||
// If we can't get the host from the URI (e.g. about:, javascript:,
|
// If we can't get the host from the URI (e.g. about:, javascript:,
|
||||||
// etc), just return an null string.
|
// etc), just return an empty string.
|
||||||
SetDOMStringToNull(aDomain);
|
aDomain.Truncate();
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
[OverrideBuiltins]
|
[OverrideBuiltins]
|
||||||
interface HTMLDocument : Document {
|
interface HTMLDocument : Document {
|
||||||
[SetterThrows]
|
[SetterThrows]
|
||||||
attribute DOMString? domain;
|
attribute DOMString domain;
|
||||||
[Throws]
|
[Throws]
|
||||||
attribute DOMString cookie;
|
attribute DOMString cookie;
|
||||||
// DOM tree accessors
|
// DOM tree accessors
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue