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:
gagan%netscape.com 2000-01-25 03:11:16 +00:00
Родитель 2165922d53
Коммит 2113f0d630
2 изменённых файлов: 15 добавлений и 7 удалений

1
netwerk/cache/mgr/nsCacheEntryChannel.cpp поставляемый
Просмотреть файл

@ -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;

21
netwerk/cache/mgr/nsCachedNetData.cpp поставляемый
Просмотреть файл

@ -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;