Skip to content

Commit

Permalink
Bug 1195491 - use nsCOMPtr in RDFContentSinkImpl; r=bsmedberg
Browse files Browse the repository at this point in the history
  • Loading branch information
froydnj committed Aug 12, 2015
1 parent 1f8b781 commit 3ff4d75
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions rdf/base/nsRDFContentSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class RDFContentSinkImpl : public nsIRDFContentSink,

nsAutoTArray<RDFContextStackElement, 8>* mContextStack;

nsIURI* mDocumentURL;
nsCOMPtr<nsIURI> mDocumentURL;

private:
static PRLogModuleInfo* gLog;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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"));
Expand Down Expand Up @@ -608,8 +605,6 @@ RDFContentSinkImpl::Init(nsIURI* aURL)
return NS_ERROR_NULL_POINTER;

mDocumentURL = aURL;
NS_ADDREF(aURL);

mState = eRDFContentSinkState_InProlog;
return NS_OK;
}
Expand Down

0 comments on commit 3ff4d75

Please sign in to comment.