зеркало из 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,
|
nsresult Init(nsIStreamListener *aListener, nsILoadGroup *aLoadGroup,
|
||||||
nsIChannel *aChannel, nsISupports *aContext)
|
nsIChannel *aChannel, nsISupports *aContext)
|
||||||
{
|
{
|
||||||
nsresult rv = NS_OK;
|
|
||||||
mListener = aListener;
|
mListener = aListener;
|
||||||
mLoadGroup = aLoadGroup;
|
mLoadGroup = aLoadGroup;
|
||||||
mChannel = aChannel;
|
mChannel = aChannel;
|
||||||
|
|
|
@ -96,8 +96,12 @@ public:
|
||||||
// extra vtable pointer in nsCachedNetData
|
// extra vtable pointer in nsCachedNetData
|
||||||
class StreamAsFile : public nsIStreamAsFile {
|
class StreamAsFile : public nsIStreamAsFile {
|
||||||
public:
|
public:
|
||||||
StreamAsFile(nsCachedNetData* cacheEntry): mCacheEntry(cacheEntry) {}
|
StreamAsFile(nsCachedNetData* cacheEntry): mCacheEntry(cacheEntry) {
|
||||||
virtual ~StreamAsFile() {};
|
NS_IF_ADDREF(mCacheEntry);
|
||||||
|
}
|
||||||
|
virtual ~StreamAsFile() {
|
||||||
|
NS_IF_RELEASE(mCacheEntry);
|
||||||
|
};
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
|
||||||
|
@ -114,7 +118,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsCOMPtr<nsCachedNetData> mCacheEntry;
|
nsCachedNetData* mCacheEntry;
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_IMPL_ADDREF(StreamAsFile)
|
NS_IMPL_ADDREF(StreamAsFile)
|
||||||
|
@ -1063,11 +1067,16 @@ public:
|
||||||
|
|
||||||
InterceptStreamListener(nsCachedNetData *aCacheEntry,
|
InterceptStreamListener(nsCachedNetData *aCacheEntry,
|
||||||
nsIStreamListener *aOriginalListener):
|
nsIStreamListener *aOriginalListener):
|
||||||
mCacheEntry(aCacheEntry), mOriginalListener(aOriginalListener) {
|
mCacheEntry(aCacheEntry),
|
||||||
NS_INIT_REFCNT(); }
|
mOriginalListener(aOriginalListener)
|
||||||
|
{
|
||||||
|
NS_INIT_REFCNT();
|
||||||
|
NS_IF_ADDREF(mCacheEntry);
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~InterceptStreamListener() {
|
virtual ~InterceptStreamListener() {
|
||||||
mCacheEntry->ClearFlag(nsCachedNetData::UPDATE_IN_PROGRESS);
|
mCacheEntry->ClearFlag(nsCachedNetData::UPDATE_IN_PROGRESS);
|
||||||
|
NS_IF_RELEASE(mCacheEntry);
|
||||||
};
|
};
|
||||||
|
|
||||||
nsresult Init(PRUint32 aStartingOffset) {
|
nsresult Init(PRUint32 aStartingOffset) {
|
||||||
|
@ -1141,7 +1150,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
nsCOMPtr<nsCachedNetData> mCacheEntry;
|
nsCachedNetData* mCacheEntry;
|
||||||
nsCOMPtr<nsIStreamListener> mOriginalListener;
|
nsCOMPtr<nsIStreamListener> mOriginalListener;
|
||||||
nsCOMPtr<nsIOutputStream> mCacheStream;
|
nsCOMPtr<nsIOutputStream> mCacheStream;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче