зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1416682 - Don't allow writing alt-data to HTTP cache entry when the loading channel has failed to release the entry, r=michal
This commit is contained in:
Родитель
5c04388149
Коммит
be74fa61ca
|
@ -1105,7 +1105,9 @@ HttpChannelChild::OnStopRequest(const nsresult& channelStatus,
|
||||||
// If there is a possibility we might want to write alt data to the cache
|
// If there is a possibility we might want to write alt data to the cache
|
||||||
// entry, we keep the channel alive. We still send the DocumentChannelCleanup
|
// entry, we keep the channel alive. We still send the DocumentChannelCleanup
|
||||||
// message but request the cache entry to be kept by the parent.
|
// message but request the cache entry to be kept by the parent.
|
||||||
if (!mPreferredCachedAltDataType.IsEmpty()) {
|
// If the channel has failed, the cache entry is in a non-writtable state and
|
||||||
|
// we want to release it to not block following consumers.
|
||||||
|
if (NS_SUCCEEDED(channelStatus) && !mPreferredCachedAltDataType.IsEmpty()) {
|
||||||
mKeptAlive = true;
|
mKeptAlive = true;
|
||||||
SendDocumentChannelCleanup(false); // don't clear cache entry
|
SendDocumentChannelCleanup(false); // don't clear cache entry
|
||||||
return;
|
return;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче