summaryrefslogtreecommitdiffstats
path: root/dom/html
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-07-20 11:13:54 +0200
committerGitHub <noreply@github.com>2018-07-20 11:13:54 +0200
commit7fce9b4a0aa36117e5c3d193bade1620d6e4bc91 (patch)
treef9cfbb9aad3b3d9f50c30e33b3164f9dcbd39000 /dom/html
parentcba8e7b14e7703fbe032e41acfaf7f1ba9536aaf (diff)
parent324cab5115df99a14217545a180a0e36ff007ce7 (diff)
downloadUXP-7fce9b4a0aa36117e5c3d193bade1620d6e4bc91.tar
UXP-7fce9b4a0aa36117e5c3d193bade1620d6e4bc91.tar.gz
UXP-7fce9b4a0aa36117e5c3d193bade1620d6e4bc91.tar.lz
UXP-7fce9b4a0aa36117e5c3d193bade1620d6e4bc91.tar.xz
UXP-7fce9b4a0aa36117e5c3d193bade1620d6e4bc91.zip
Merge pull request #652 from janekptacijarabaci/dom_document_domain_null_1
Make document.domain non-nullable
Diffstat (limited to 'dom/html')
-rw-r--r--dom/html/nsHTMLDocument.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp
index 69e710242..d64c27727 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;
}