bug 905410 - remove most remaining usage of nspr atomics outside of xpcom/ r=ehsan
This commit is contained in:
@@ -35,12 +35,12 @@
|
||||
#include "nsAlgorithm.h"
|
||||
#include "nsProxyRelease.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "TimeStamp.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
#include "plbase64.h"
|
||||
#include "pratom.h"
|
||||
#include "prmem.h"
|
||||
#include "prnetdb.h"
|
||||
#include "prbit.h"
|
||||
@@ -424,12 +424,12 @@ public:
|
||||
|
||||
void IncrementSessionCount()
|
||||
{
|
||||
PR_ATOMIC_INCREMENT(&mSessionCount);
|
||||
mSessionCount++;
|
||||
}
|
||||
|
||||
void DecrementSessionCount()
|
||||
{
|
||||
PR_ATOMIC_DECREMENT(&mSessionCount);
|
||||
mSessionCount--;
|
||||
}
|
||||
|
||||
int32_t SessionCount()
|
||||
@@ -468,7 +468,7 @@ private:
|
||||
|
||||
// SessionCount might be decremented from the main or the socket
|
||||
// thread, so manage it with atomic counters
|
||||
int32_t mSessionCount;
|
||||
Atomic<int32_t> mSessionCount;
|
||||
|
||||
// Queue for websockets that have not completed connecting yet.
|
||||
// The first nsOpenConn with a given address will be either be
|
||||
|
||||
Reference in New Issue
Block a user