Fixing bug 281744. Remove dead code and unnecessary code. r+sr=peterv@propagandism.org
git-svn-id: svn://10.0.0.236/trunk@169698 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
3157e458e8
commit
ea56e33ec6
@ -243,7 +243,6 @@ static void* FP2TV(void *fp)
|
|||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// Globals
|
// Globals
|
||||||
NPNetscapeFuncs ns4xPlugin::CALLBACKS;
|
NPNetscapeFuncs ns4xPlugin::CALLBACKS;
|
||||||
static nsIMemory* gMalloc = nsnull;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
void
|
void
|
||||||
@ -522,13 +521,6 @@ ns4xPlugin::~ns4xPlugin(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
void ns4xPlugin::ReleaseStatics()
|
|
||||||
{
|
|
||||||
NS_IF_RELEASE(gMalloc);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
#if defined(XP_MAC) || defined(XP_MACOSX)
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
void ns4xPlugin::SetPluginRefNum(short aRefNum)
|
void ns4xPlugin::SetPluginRefNum(short aRefNum)
|
||||||
@ -555,12 +547,6 @@ ns4xPlugin::CreatePlugin(nsIServiceManagerObsolete* aServiceMgr,
|
|||||||
{
|
{
|
||||||
CheckClassInitialized();
|
CheckClassInitialized();
|
||||||
|
|
||||||
// set up the MemAllocator service now because it might be used by the plugin
|
|
||||||
if (aServiceMgr && !gMalloc) {
|
|
||||||
aServiceMgr->GetService(kMemoryCID, NS_GET_IID(nsIMemory),
|
|
||||||
(nsISupports**)&gMalloc);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||||
|
|
||||||
ns4xPlugin *plptr;
|
ns4xPlugin *plptr;
|
||||||
@ -1183,7 +1169,7 @@ _memfree (void *ptr)
|
|||||||
NPN_PLUGIN_LOG(PLUGIN_LOG_NOISY, ("NPN_MemFree: ptr=%p\n", ptr));
|
NPN_PLUGIN_LOG(PLUGIN_LOG_NOISY, ("NPN_MemFree: ptr=%p\n", ptr));
|
||||||
|
|
||||||
if(ptr)
|
if(ptr)
|
||||||
gMalloc->Free(ptr);
|
nsMemory::Free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1193,7 +1179,7 @@ _memflush(uint32 size)
|
|||||||
{
|
{
|
||||||
NPN_PLUGIN_LOG(PLUGIN_LOG_NOISY, ("NPN_MemFlush: size=%d\n", size));
|
NPN_PLUGIN_LOG(PLUGIN_LOG_NOISY, ("NPN_MemFlush: size=%d\n", size));
|
||||||
|
|
||||||
gMalloc->HeapMinimize(PR_TRUE);
|
nsMemory::HeapMinimize(PR_TRUE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2062,7 +2048,7 @@ void * NP_EXPORT
|
|||||||
_memalloc (uint32 size)
|
_memalloc (uint32 size)
|
||||||
{
|
{
|
||||||
NPN_PLUGIN_LOG(PLUGIN_LOG_NOISY, ("NPN_MemAlloc: size=%d\n", size));
|
NPN_PLUGIN_LOG(PLUGIN_LOG_NOISY, ("NPN_MemAlloc: size=%d\n", size));
|
||||||
return gMalloc->Alloc(size);
|
return nsMemory::Alloc(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OJI
|
#ifdef OJI
|
||||||
|
|||||||
@ -101,8 +101,6 @@ public:
|
|||||||
nsIServiceManagerObsolete* serviceMgr);
|
nsIServiceManagerObsolete* serviceMgr);
|
||||||
virtual ~ns4xPlugin(void);
|
virtual ~ns4xPlugin(void);
|
||||||
|
|
||||||
static void ReleaseStatics();
|
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
|
||||||
//nsIFactory interface
|
//nsIFactory interface
|
||||||
|
|||||||
@ -54,11 +54,4 @@ static const nsModuleComponentInfo gComponentInfo[] = {
|
|||||||
nsPluginHostImpl::Create },
|
nsPluginHostImpl::Create },
|
||||||
};
|
};
|
||||||
|
|
||||||
PR_STATIC_CALLBACK(void)
|
NS_IMPL_NSGETMODULE(nsPluginModule, gComponentInfo)
|
||||||
nsPluginModuleDtor(nsIModule *self)
|
|
||||||
{
|
|
||||||
ns4xPlugin::ReleaseStatics();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMPL_NSGETMODULE_WITH_DTOR(nsPluginModule, gComponentInfo,
|
|
||||||
nsPluginModuleDtor)
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user