Bug 1159747 - delete h2 static compression table in such a way to avoid crashes after network changes. r=mcmanus

This commit is contained in:
Nicholas Hurley 2015-05-27 09:49:00 +02:00
parent 6af93e1ff5
commit 2e270bf83d
3 changed files with 9 additions and 2 deletions

View File

@ -225,6 +225,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFtpProtocolHandler, Init)
#ifdef NECKO_PROTOCOL_http
// http/https
#include "nsHttpHandler.h"
#include "Http2Compression.h"
#undef LOG
#undef LOG_ENABLED
#include "nsHttpAuthManager.h"
@ -655,6 +656,10 @@ static void nsNetShutdown()
mozilla::net::WebSocketChannel::Shutdown();
#endif // NECKO_PROTOCOL_websocket
#ifdef NECKO_PROTOCOL_http
mozilla::net::Http2CompressionCleanup();
#endif // NECKO_PROTOCOL_http
delete gNetSniffers;
gNetSniffers = nullptr;
delete gDataSniffers;

View File

@ -228,6 +228,10 @@ Http2BaseCompressor::MakeRoom(uint32_t amount, const char *direction)
void
Http2BaseCompressor::DumpState()
{
if (!LOG_ENABLED()) {
return;
}
LOG(("Header Table"));
uint32_t i;
uint32_t length = mHeaderTable.Length();

View File

@ -30,7 +30,6 @@
#include "nsITransport.h"
#include "nsISocketTransportService.h"
#include <algorithm>
#include "Http2Compression.h"
#include "mozilla/ChaosMode.h"
#include "mozilla/unused.h"
@ -177,7 +176,6 @@ nsHttpConnectionMgr::Shutdown()
// wait for shutdown event to complete
while (!shutdown)
NS_ProcessNextEvent(NS_GetCurrentThread());
Http2CompressionCleanup();
return NS_OK;
}