Bug 1195491 - use nsCOMPtr in RDFContentSinkImpl; r=bsmedberg

This commit is contained in:
Nathan Froyd 2015-08-12 00:12:05 -04:00
parent 1f8b781e7f
commit 3ff4d753ca

View File

@ -223,7 +223,7 @@ protected:
nsAutoTArray<RDFContextStackElement, 8>* mContextStack;
nsIURI* mDocumentURL;
nsCOMPtr<nsIURI> mDocumentURL;
private:
static PRLogModuleInfo* gLog;
@ -263,8 +263,7 @@ RDFContentSinkImpl::RDFContentSinkImpl()
mTextSize(0),
mState(eRDFContentSinkState_InProlog),
mParseMode(eRDFContentSinkParseMode_Literal),
mContextStack(nullptr),
mDocumentURL(nullptr)
mContextStack(nullptr)
{
if (gRefCnt++ == 0) {
NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
@ -304,8 +303,6 @@ RDFContentSinkImpl::~RDFContentSinkImpl()
fprintf(stdout, "%d - RDF: RDFContentSinkImpl\n", gInstanceCount);
#endif
NS_IF_RELEASE(mDocumentURL);
if (mContextStack) {
MOZ_LOG(gLog, LogLevel::Warning,
("rdfxml: warning! unclosed tag"));
@ -608,8 +605,6 @@ RDFContentSinkImpl::Init(nsIURI* aURL)
return NS_ERROR_NULL_POINTER;
mDocumentURL = aURL;
NS_ADDREF(aURL);
mState = eRDFContentSinkState_InProlog;
return NS_OK;
}