зеркало из https://github.com/mozilla/gecko-dev.git
Bug 199006 there are two independent initializations of nsMemoryImpl before Init_XPCOM2 finishes
r=dougt
This commit is contained in:
Родитель
23f3006361
Коммит
37891802cb
|
@ -212,6 +212,8 @@ MemoryFlusher::Stop()
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
nsMemoryImpl* gMemory = nsnull;
|
||||||
|
|
||||||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsMemoryImpl, nsIMemory)
|
NS_IMPL_THREADSAFE_ISUPPORTS1(nsMemoryImpl, nsIMemory)
|
||||||
|
|
||||||
NS_METHOD
|
NS_METHOD
|
||||||
|
@ -219,6 +221,8 @@ nsMemoryImpl::Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aInstancePtr);
|
NS_ENSURE_ARG_POINTER(aInstancePtr);
|
||||||
NS_ENSURE_PROPER_AGGREGATION(outer, aIID);
|
NS_ENSURE_PROPER_AGGREGATION(outer, aIID);
|
||||||
|
if (gMemory && NS_SUCCEEDED(gMemory->QueryInterface(aIID, aInstancePtr)))
|
||||||
|
return NS_OK;
|
||||||
|
|
||||||
nsMemoryImpl* mm = new nsMemoryImpl();
|
nsMemoryImpl* mm = new nsMemoryImpl();
|
||||||
if (mm == NULL)
|
if (mm == NULL)
|
||||||
|
@ -484,8 +488,6 @@ nsMemoryImpl::DestroyFlushEvent(PLEvent* aEvent)
|
||||||
// no-op, since mEvent is a member of nsMemoryImpl
|
// no-op, since mEvent is a member of nsMemoryImpl
|
||||||
}
|
}
|
||||||
|
|
||||||
nsMemoryImpl* gMemory = nsnull;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
EnsureGlobalMemoryService()
|
EnsureGlobalMemoryService()
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче