Bug 1019918 - Remove pushed stream from SpdyPushCache when cleaning it up. r=mcmanus

--HG--
extra : rebase_source : 2c1c23668adf041eb27c8f0509aebfbfab9497ca
This commit is contained in:
Nicholas Hurley 2014-06-04 15:37:00 -04:00
Родитель 32a5b36c8a
Коммит 3c8da7e52c
1 изменённых файлов: 15 добавлений и 1 удалений

Просмотреть файл

@ -935,8 +935,22 @@ Http2Session::CleanupStream(Http2Stream *aStream, nsresult aResult,
uint32_t id = aStream->StreamID();
if (id > 0) {
mStreamIDHash.Remove(id);
if (!(id & 1))
if (!(id & 1)) {
mPushedStreams.RemoveElement(aStream);
Http2PushedStream *pushStream = static_cast<Http2PushedStream *>(aStream);
nsAutoCString hashKey;
pushStream->GetHashKey(hashKey);
nsILoadGroupConnectionInfo *loadGroupCI = aStream->LoadGroupConnectionInfo();
if (loadGroupCI) {
SpdyPushCache *cache = nullptr;
loadGroupCI->GetSpdyPushCache(&cache);
if (cache) {
Http2PushedStream *trash = cache->RemovePushedStreamHttp2(hashKey);
LOG3(("Http2Session::CleanupStream %p aStream=%p pushStream=%p trash=%p",
this, aStream, pushStream, trash));
}
}
}
}
RemoveStreamFromQueues(aStream);