update rgnrectallocator changes to match pending m-c patch.
update rgnrectallocator changes to match pending m-c patch.
--- a/gfx/src/nsRegion.cpp
+++ b/gfx/src/nsRegion.cpp
@@ -97,17 +97,17 @@ class RgnRectMemoryAllocator
void InitLock () { mLock = PR_NewLock (); }
void DestroyLock () { PR_DestroyLock (mLock); }
void Lock () { PR_Lock (mLock); }
void Unlock () { PR_Unlock (mLock); }
#elif defined (DEBUG)
struct _ {
_() { mThread = PR_CurrentThread(); }
- void* GetThread() { return mThread; }
+ void* GetThread() { return mThread; }
void* mThread;
} _mOwningThread;
void InitLock () { NS_ASSERT_OWNINGTHREAD (RgnRectMemoryAllocator); }
void DestroyLock () { NS_ASSERT_OWNINGTHREAD (RgnRectMemoryAllocator); }
void Lock () { NS_ASSERT_OWNINGTHREAD (RgnRectMemoryAllocator); }
void Unlock () { NS_ASSERT_OWNINGTHREAD (RgnRectMemoryAllocator); }
#else
@@ -141,17 +141,17 @@ public:
RgnRectMemoryAllocator (PRUint32 aNumOfEntries);
~RgnRectMemoryAllocator ();
nsRegion::RgnRect* Alloc ();
void Free (nsRegion::RgnRect* aRect);
#if defined(DEBUG)
void SetOwningThread(void* aOwningThread) {
- _mOwningThread.mThread = aOwningThread;
+ _mOwningThread.mThread = aOwningThread;
}
#endif
};
RgnRectMemoryAllocator::RgnRectMemoryAllocator (PRUint32 aNumOfEntries)
{
InitLock ();
--- a/gfx/thebes/src/gfxPlatform.cpp
+++ b/gfx/thebes/src/gfxPlatform.cpp
@@ -66,16 +66,18 @@
#include "cairo.h"
#include "qcms.h"
#include "plstr.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
#include "nsIPrefBranch2.h"
+#include "nsRegion.h"
+
gfxPlatform *gPlatform = nsnull;
// These two may point to the same profile
static qcms_profile *gCMSOutputProfile = nsnull;
static qcms_profile *gCMSsRGBProfile = nsnull;
static qcms_transform *gCMSRGBTransform = nsnull;
static qcms_transform *gCMSInverseRGBTransform = nsnull;
@@ -177,16 +179,18 @@ gfxPlatform::Init()
#elif defined(XP_BEOS)
gPlatform = new gfxBeOSPlatform;
#elif defined(XP_OS2)
gPlatform = new gfxOS2Platform;
#endif
if (!gPlatform)
return NS_ERROR_OUT_OF_MEMORY;
+ nsRegion::MigrateToCurrentThread();
+
nsresult rv;
#if defined(XP_MACOSX)
rv = gfxQuartzFontCache::Init();
if (NS_FAILED(rv)) {
NS_ERROR("Could not initialize gfxQuartzFontCache");
Shutdown();
return rv;
--- a/ipc/glue/GeckoThread.cpp
+++ b/ipc/glue/GeckoThread.cpp
@@ -61,18 +61,16 @@ void
GeckoThread::Init()
{
ChildThread::Init();
// Certain plugins, such as flash, steal the unhandled exception filter
// thus we never get crash reports when they fault. This call fixes it.
message_loop()->set_exception_restoration(true);
- nsRegion::MigrateToCurrentThread();
-
NS_LogInit();
mXREEmbed.Start();
}
void
GeckoThread::CleanUp()
{
mXREEmbed.Stop();