mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 819475 - Make document.domain non-nullable; r=bz
Make document.domain non-nullable, to conform to the HTML spec. MozReview-Commit-ID: B1YuQekBgZD --HG-- extra : rebase_source : 00999e16549e62c783f06f61c62000ab7677cf1d
This commit is contained in:
parent
ea4aa07dab
commit
14d4b9546c
@ -890,7 +890,7 @@ nsHTMLDocument::GetDomain(nsAString& aDomain)
|
||||
nsCOMPtr<nsIURI> uri = GetDomainURI();
|
||||
|
||||
if (!uri) {
|
||||
SetDOMStringToNull(aDomain);
|
||||
aDomain.Truncate();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -900,8 +900,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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
[OverrideBuiltins]
|
||||
interface HTMLDocument : Document {
|
||||
[SetterThrows]
|
||||
attribute DOMString? domain;
|
||||
attribute DOMString domain;
|
||||
[Throws]
|
||||
attribute DOMString cookie;
|
||||
// DOM tree accessors
|
||||
|
Loading…
Reference in New Issue
Block a user