From 123dea184e8cb78989897ff2378c7317583c3590 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Mon, 17 Apr 2006 02:19:19 +0000 Subject: [PATCH] Better empty string stuff. Still followups to bug 315826 --- parser/xml/src/nsSAXXMLReader.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/parser/xml/src/nsSAXXMLReader.cpp b/parser/xml/src/nsSAXXMLReader.cpp index eb048629a7dd..194b1b4f829f 100644 --- a/parser/xml/src/nsSAXXMLReader.cpp +++ b/parser/xml/src/nsSAXXMLReader.cpp @@ -242,13 +242,9 @@ nsSAXXMLReader::HandleNotationDecl(const PRUnichar *aNotationName, const PRUnichar *aPublicId) { if (mDTDHandler) { - const nsString& empty = EmptyString(); - if (!aSystemId) { - aSystemId = empty.get(); - } - if (!aPublicId) { - aPublicId = empty.get(); - } + PRUnichar nullChar = PRUnichar(0); + if (!aSystemId) aSystemId = &nullChar; + if (!aPublicId) aPublicId = &nullChar; return mDTDHandler->NotationDecl(nsDependentString(aNotationName), nsDependentString(aSystemId), @@ -264,13 +260,9 @@ nsSAXXMLReader::HandleUnparsedEntityDecl(const PRUnichar *aEntityName, const PRUnichar *aNotationName) { if (mDTDHandler) { - const nsString& empty = EmptyString(); - if (!aSystemId) { - aSystemId = empty.get(); - } - if (!aPublicId) { - aPublicId = empty.get(); - } + PRUnichar nullChar = PRUnichar(0); + if (!aSystemId) aSystemId = &nullChar; + if (!aPublicId) aPublicId = &nullChar; return mDTDHandler->UnparsedEntityDecl(nsDependentString(aEntityName), nsDependentString(aSystemId),