Bug 1156109 - Make nsStorageInputStream::mStorageStream an nsRefPtr; r=froydnj

This commit is contained in:
Ehsan Akhgari 2015-04-19 14:54:58 -04:00
parent e47779dc37
commit c4e38c88d3

View File

@ -351,7 +351,6 @@ public:
mSegmentSize(aSegmentSize), mLogicalCursor(0),
mStatus(NS_OK)
{
NS_ADDREF(mStorageStream);
}
NS_DECL_THREADSAFE_ISUPPORTS
@ -363,7 +362,6 @@ public:
private:
~nsStorageInputStream()
{
NS_IF_RELEASE(mStorageStream);
}
protected:
@ -372,7 +370,7 @@ protected:
friend class nsStorageStream;
private:
nsStorageStream* mStorageStream;
nsRefPtr<nsStorageStream> mStorageStream;
uint32_t mReadCursor; // Next memory location to read byte, or 0
uint32_t mSegmentEnd; // One byte past end of current buffer segment
uint32_t mSegmentNum; // Segment number containing read cursor