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