Bug 813438 - Part 1: Implement NS_SniffContent; r=bzbarsky
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
#include "nsDNSPrefetch.h"
|
||||
#include "nsAboutProtocolHandler.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "nsCategoryCache.h"
|
||||
#include "nsIContentSniffer.h"
|
||||
|
||||
#include "nsNetCID.h"
|
||||
|
||||
@@ -45,6 +47,10 @@
|
||||
#define BUILD_BINHEX_DECODER 1
|
||||
#endif
|
||||
|
||||
typedef nsCategoryCache<nsIContentSniffer> ContentSnifferCache;
|
||||
NS_HIDDEN_(ContentSnifferCache*) gNetSniffers = nullptr;
|
||||
NS_HIDDEN_(ContentSnifferCache*) gDataSniffers = nullptr;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "nsIOService.h"
|
||||
@@ -643,6 +649,11 @@ static void nsNetShutdown()
|
||||
// Release the Websocket Admission Manager
|
||||
mozilla::net::WebSocketChannel::Shutdown();
|
||||
#endif // NECKO_PROTOCOL_websocket
|
||||
|
||||
delete gNetSniffers;
|
||||
gNetSniffers = nullptr;
|
||||
delete gDataSniffers;
|
||||
gDataSniffers = nullptr;
|
||||
}
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_IOSERVICE_CID);
|
||||
|
||||
Reference in New Issue
Block a user