mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 10:27:03 +00:00
Bug 1219910 - make gSocketThread a relaxed atomic variable; r=mcmanus
Many places that (re-)declared gSocketThread already included nsSocketTransportService2.h; we can delete the declaration for those places. For all the other places, we need to include nsSocketTransportService2.h.
This commit is contained in:
parent
ac15b0955e
commit
0d181baf2d
@ -19,8 +19,6 @@
|
||||
#include <mmsystem.h>
|
||||
#endif
|
||||
|
||||
extern PRThread *gSocketThread;
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
|
@ -20,8 +20,6 @@
|
||||
#include "ScopedNSSTypes.h"
|
||||
#include "ssl.h"
|
||||
|
||||
extern PRThread *gSocketThread;
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "mozilla/PublicSSL.h"
|
||||
@ -33,7 +34,7 @@ LazyLogModule gSocketTransportLog("nsSocketTransport");
|
||||
LazyLogModule gUDPSocketLog("UDPSocket");
|
||||
|
||||
nsSocketTransportService *gSocketTransportService = nullptr;
|
||||
PRThread *gSocketThread = nullptr;
|
||||
Atomic<PRThread*, Relaxed> gSocketThread;
|
||||
|
||||
#define SEND_BUFFER_PREF "network.tcp.sendbuffer"
|
||||
#define KEEPALIVE_ENABLED_PREF "network.tcp.keepalive.enabled"
|
||||
|
@ -262,6 +262,6 @@ private:
|
||||
};
|
||||
|
||||
extern nsSocketTransportService *gSocketTransportService;
|
||||
extern PRThread *gSocketThread;
|
||||
extern mozilla::Atomic<PRThread*, mozilla::Relaxed> gSocketThread;
|
||||
|
||||
#endif // !nsSocketTransportService_h__
|
||||
|
@ -15,8 +15,7 @@
|
||||
#include "nsIConsoleService.h"
|
||||
#include "nsHttpRequestHead.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
extern PRThread *gSocketThread;
|
||||
#include "nsSocketTransportService2.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
@ -18,8 +18,6 @@
|
||||
#include "Http2HuffmanOutgoing.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
|
||||
extern PRThread *gSocketThread;
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
|
@ -35,11 +35,7 @@
|
||||
#include "prnetdb.h"
|
||||
#include "sslt.h"
|
||||
#include "mozilla/Snprintf.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
// defined by the socket transport service while active
|
||||
extern PRThread *gSocketThread;
|
||||
#endif
|
||||
#include "nsSocketTransportService2.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
@ -32,11 +32,6 @@
|
||||
#include "nsStandardURL.h"
|
||||
#include "prnetdb.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
// defined by the socket transport service while active
|
||||
extern PRThread *gSocketThread;
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
|
@ -26,14 +26,10 @@
|
||||
#include "SpdySession31.h"
|
||||
#include "SpdyStream31.h"
|
||||
#include "SpdyZlibReporter.h"
|
||||
#include "nsSocketTransportService2.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef DEBUG
|
||||
// defined by the socket transport service while active
|
||||
extern PRThread *gSocketThread;
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
|
@ -28,11 +28,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef DEBUG
|
||||
// defined by the socket transport service while active
|
||||
extern PRThread *gSocketThread;
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
|
@ -24,11 +24,6 @@
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
// defined by the socket transport service while active
|
||||
extern PRThread *gSocketThread;
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
|
@ -33,11 +33,6 @@
|
||||
#include "sslt.h"
|
||||
#include "TunnelUtils.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
// defined by the socket transport service while active
|
||||
extern PRThread *gSocketThread;
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
|
@ -37,9 +37,6 @@
|
||||
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
// defined by the socket transport service while active
|
||||
extern PRThread *gSocketThread;
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "nsHttpChannelAuthProvider.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsSocketTransportService2.h"
|
||||
|
||||
#include "mozilla/net/NeckoChild.h"
|
||||
#include "mozilla/ipc/URIUtils.h"
|
||||
@ -73,11 +74,6 @@
|
||||
#include "mozilla/net/HttpChannelChild.h"
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
// defined by the socket transport service while active
|
||||
extern PRThread *gSocketThread;
|
||||
#endif
|
||||
|
||||
#define UA_PREF_PREFIX "general.useragent."
|
||||
#ifdef XP_WIN
|
||||
#define UA_SPARE_PLATFORM
|
||||
|
@ -12,12 +12,11 @@
|
||||
#include "nsISocketTransport.h"
|
||||
#include "nsIPipe.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsSocketTransportService2.h"
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef DEBUG
|
||||
#include "prthread.h"
|
||||
// defined by the socket transport service while active
|
||||
extern PRThread *gSocketThread;
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -44,13 +44,6 @@
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef DEBUG
|
||||
// defined by the socket transport service while active
|
||||
extern PRThread *gSocketThread;
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static NS_DEFINE_CID(kMultiplexInputStream, NS_MULTIPLEXINPUTSTREAM_CID);
|
||||
|
||||
// Place a limit on how much non-compliant HTTP can be skipped while
|
||||
|
@ -55,6 +55,7 @@
|
||||
#include "mozilla/StaticMutex.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "nsSocketTransportService2.h"
|
||||
|
||||
#include "plbase64.h"
|
||||
#include "prmem.h"
|
||||
@ -70,8 +71,6 @@
|
||||
// dupe one constant we need from it
|
||||
#define CLOSE_GOING_AWAY 1001
|
||||
|
||||
extern PRThread *gSocketThread;
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::net;
|
||||
|
||||
|
@ -12,8 +12,7 @@
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
extern PRThread *gSocketThread;
|
||||
#include "nsSocketTransportService2.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
@ -7,8 +7,7 @@
|
||||
#include "WebSocketFrame.h"
|
||||
|
||||
#include "WebSocketChannel.h"
|
||||
|
||||
extern PRThread *gSocketThread;
|
||||
#include "nsSocketTransportService2.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
Loading…
x
Reference in New Issue
Block a user