зеркало из https://github.com/mozilla/gecko-dev.git
We had a nsCOMPtr on a class instead on a interface (along with the problem that its default constructor was protected) This was preventing the cache from being built on AIX. Should work now. r=self(& scc) See bug 24876
This commit is contained in:
Родитель
2165922d53
Коммит
2113f0d630
|
@ -129,7 +129,6 @@ class CacheManagerStreamListener: public nsIStreamListener {
|
|||
nsresult Init(nsIStreamListener *aListener, nsILoadGroup *aLoadGroup,
|
||||
nsIChannel *aChannel, nsISupports *aContext)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
mListener = aListener;
|
||||
mLoadGroup = aLoadGroup;
|
||||
mChannel = aChannel;
|
||||
|
|
|
@ -96,8 +96,12 @@ public:
|
|||
// extra vtable pointer in nsCachedNetData
|
||||
class StreamAsFile : public nsIStreamAsFile {
|
||||
public:
|
||||
StreamAsFile(nsCachedNetData* cacheEntry): mCacheEntry(cacheEntry) {}
|
||||
virtual ~StreamAsFile() {};
|
||||
StreamAsFile(nsCachedNetData* cacheEntry): mCacheEntry(cacheEntry) {
|
||||
NS_IF_ADDREF(mCacheEntry);
|
||||
}
|
||||
virtual ~StreamAsFile() {
|
||||
NS_IF_RELEASE(mCacheEntry);
|
||||
};
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -114,7 +118,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsCachedNetData> mCacheEntry;
|
||||
nsCachedNetData* mCacheEntry;
|
||||
};
|
||||
|
||||
NS_IMPL_ADDREF(StreamAsFile)
|
||||
|
@ -1063,11 +1067,16 @@ public:
|
|||
|
||||
InterceptStreamListener(nsCachedNetData *aCacheEntry,
|
||||
nsIStreamListener *aOriginalListener):
|
||||
mCacheEntry(aCacheEntry), mOriginalListener(aOriginalListener) {
|
||||
NS_INIT_REFCNT(); }
|
||||
mCacheEntry(aCacheEntry),
|
||||
mOriginalListener(aOriginalListener)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
NS_IF_ADDREF(mCacheEntry);
|
||||
}
|
||||
|
||||
virtual ~InterceptStreamListener() {
|
||||
mCacheEntry->ClearFlag(nsCachedNetData::UPDATE_IN_PROGRESS);
|
||||
NS_IF_RELEASE(mCacheEntry);
|
||||
};
|
||||
|
||||
nsresult Init(PRUint32 aStartingOffset) {
|
||||
|
@ -1141,7 +1150,7 @@ private:
|
|||
}
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsCachedNetData> mCacheEntry;
|
||||
nsCachedNetData* mCacheEntry;
|
||||
nsCOMPtr<nsIStreamListener> mOriginalListener;
|
||||
nsCOMPtr<nsIOutputStream> mCacheStream;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче