Backed out changeset 4beec31b9ea9 for increasing frequency of intermittent orange bug 618052

This commit is contained in:
Chris Jones
2011-03-31 18:57:38 -05:00
parent 5dece3352a
commit ecb9597975
165 changed files with 2718 additions and 1375 deletions

View File

@@ -48,24 +48,31 @@
#include "nsMemory.h"
#include "nsUUIDGenerator.h"
#include "nsAutoLock.h"
using namespace mozilla;
#include "nsUUIDGenerator.h"
NS_IMPL_THREADSAFE_ISUPPORTS1(nsUUIDGenerator, nsIUUIDGenerator)
nsUUIDGenerator::nsUUIDGenerator()
: mLock("nsUUIDGenerator.mLock")
: mLock(nsnull)
{
}
nsUUIDGenerator::~nsUUIDGenerator()
{
if (mLock) {
nsAutoLock::DestroyLock(mLock);
}
}
nsresult
nsUUIDGenerator::Init()
{
mLock = nsAutoLock::NewLock("nsUUIDGenerator::mLock");
NS_ENSURE_TRUE(mLock, NS_ERROR_OUT_OF_MEMORY);
// We're a service, so we're guaranteed that Init() is not going
// to be reentered while we're inside Init().
@@ -129,7 +136,7 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsID* id)
{
// The various code in this method is probably not threadsafe, so lock
// across the whole method.
MutexAutoLock lock(mLock);
nsAutoLock lock(mLock);
#if defined(WINCE)
// WINCE only has CoCreateGuid if DCOM support is compiled into the BSP;