summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-07-20 07:45:05 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-07-20 07:45:05 +0200
commit324cab5115df99a14217545a180a0e36ff007ce7 (patch)
tree221a26e5dae975dc8791bbdc994c539596fd6e6d /dom
parent1ef8b01c52fdf51404c6a6b27201123322d17e81 (diff)
downloaduxp-324cab5115df99a14217545a180a0e36ff007ce7.tar.gz
Bug 819475 - Make document.domain non-nullable
Diffstat (limited to 'dom')
-rw-r--r--dom/html/nsHTMLDocument.cpp6
-rw-r--r--dom/webidl/HTMLDocument.webidl2
2 files changed, 4 insertions, 4 deletions
diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp
index 69e7102423..d64c277271 100644
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -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;
}
diff --git a/dom/webidl/HTMLDocument.webidl b/dom/webidl/HTMLDocument.webidl
index 42f6d98f79..ffb61ccdd9 100644
--- a/dom/webidl/HTMLDocument.webidl
+++ b/dom/webidl/HTMLDocument.webidl
@@ -7,7 +7,7 @@
[OverrideBuiltins]
interface HTMLDocument : Document {
[SetterThrows]
- attribute DOMString? domain;
+ attribute DOMString domain;
[Throws]
attribute DOMString cookie;
// DOM tree accessors