flyson
flyso****@users*****
2005年 10月 28日 (金) 00:26:21 JST
Index: bbs2chreader/components/nsBbs2chChannel.js diff -u bbs2chreader/components/nsBbs2chChannel.js:1.4 bbs2chreader/components/nsBbs2chChannel.js:1.5 --- bbs2chreader/components/nsBbs2chChannel.js:1.4 Sat Oct 8 02:26:27 2005 +++ bbs2chreader/components/nsBbs2chChannel.js Fri Oct 28 00:26:21 2005 @@ -99,6 +99,14 @@ }, cancel: function(aStatus){ + // キャッシュエントリがあるときは閉じる + if(this._cacheOutputStream){ + this._cacheOutputStream.close(); + } + if(this._cacheEntry){ + this._cacheEntry.close(); + } + if(this._isPending){ this._isPending = false; @@ -115,7 +123,7 @@ onCacheEntryAvailable: function(aDescriptor, aAccessGranted, aStatus){ this.requestStart(); - + if(this._cacheMode){ try{ // キャッシュからデータを取得して書き出す @@ -180,10 +188,12 @@ requestEnd: function(){ if(!this._cacheMode){ this._cacheOutputStream.close(); + this._cacheOutputStream = null; this._cacheEntry.setMetaDataElement("request-method", "GET"); this._cacheEntry.setMetaDataElement("response-head", "HTTP/1.1 200 OK\r\n"); this._cacheEntry.markValid(); this._cacheEntry.close(); + this._cacheEntry = null; } this._streamListener.onStopRequest(this, this._context, Components.results.NS_OK);