bug 905410 - remove most remaining usage of nspr atomics outside of xpcom/ r=ehsan

This commit is contained in:
Trevor Saunders
2013-08-12 05:51:49 -04:00
parent 1ec5422e09
commit cdee3ddd94
18 changed files with 63 additions and 64 deletions

View File

@@ -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