Remove overeager null argument check, since the serialization code clearly allows a null arg. Not part of build.

This commit is contained in:
hyatt%netscape.com 2002-02-09 08:48:14 +00:00
Родитель a95caab0fd
Коммит 1e1f9ba688
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -77,7 +77,7 @@ NS_IMPL_RELEASE(nsDOMSerializer)
static nsresult SetUpEncoder(nsIDOMNode *aRoot, const char* aCharset, nsIDocumentEncoder **aEncoder)
{
*aEncoder = nsnull;
nsresult rv;
nsCOMPtr<nsIDocumentEncoder> encoder(do_CreateInstance(NS_DOC_ENCODER_CONTRACTID_BASE "text/xml",&rv));
if (NS_FAILED(rv))
@ -160,8 +160,9 @@ nsDOMSerializer::SerializeToStream(nsIDOMNode *root,
{
NS_ENSURE_ARG_POINTER(root);
NS_ENSURE_ARG_POINTER(stream);
NS_ENSURE_ARG_POINTER(charset);
// The charset arg can be null, in which case we get the document's
// charset and use that when serializing.
nsCOMPtr<nsIDocumentEncoder> encoder;
nsresult rv = SetUpEncoder(root,charset,getter_AddRefs(encoder));
if (NS_FAILED(rv))