From b21414912c9e24d461dc864ac2f68291777eda13 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 1 Dec 2014 15:27:19 -0500 Subject: [PATCH] Bug 966385 followup to make the review comment code actually compile. --- dom/base/nsXMLHttpRequest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dom/base/nsXMLHttpRequest.cpp b/dom/base/nsXMLHttpRequest.cpp index 1fd32c43a4a9..3d3f80761ebb 100644 --- a/dom/base/nsXMLHttpRequest.cpp +++ b/dom/base/nsXMLHttpRequest.cpp @@ -2401,7 +2401,9 @@ GetRequestBody(nsIDOMDocument* aDoc, nsIInputStream** aResult, nsACString& aCharset) { aContentType.AssignLiteral("application/xml"); - aCharset = aDoc->GetDocumentCharacterSet(); + nsCOMPtr doc(do_QueryInterface(aDoc)); + NS_ENSURE_STATE(doc); + aCharset = doc->GetDocumentCharacterSet(); // Serialize to a stream so that the encoding used will // match the document's.