зеркало из https://github.com/mozilla/gecko-dev.git
Bugzilla bug 95784: added _PR_CleanupLayerCache and call it from
PR_Cleanup. The patch is contributed by jeff@NerdOne.com. Modified files: primpl.h, prlayer.c, prinit.c, ptthread.c.
This commit is contained in:
Родитель
1e99af1e01
Коммит
d8b557ac56
|
@ -1735,6 +1735,7 @@ extern void _PR_InitMW(void);
|
|||
extern void _PR_InitRWLocks(void);
|
||||
extern void _PR_NotifyCondVar(PRCondVar *cvar, PRThread *me);
|
||||
extern void _PR_CleanupThread(PRThread *thread);
|
||||
extern void _PR_CleanupLayerCache(void);
|
||||
extern void _PR_CleanupStacks(void);
|
||||
extern void _PR_CleanupThreads(void);
|
||||
extern void _PR_CleanupTPD(void);
|
||||
|
|
|
@ -743,4 +743,23 @@ void _PR_InitLayerCache()
|
|||
PR_ASSERT(NULL != identity_cache.ml);
|
||||
} /* _PR_InitLayerCache */
|
||||
|
||||
void _PR_CleanupLayerCache(void)
|
||||
{
|
||||
if (identity_cache.ml)
|
||||
{
|
||||
PR_DestroyLock(identity_cache.ml);
|
||||
identity_cache.ml = NULL;
|
||||
}
|
||||
|
||||
if (identity_cache.name)
|
||||
{
|
||||
PRDescIdentity ident;
|
||||
|
||||
for (ident = 0; ident <= identity_cache.ident; ident++)
|
||||
PR_DELETE(identity_cache.name[ident]);
|
||||
|
||||
PR_DELETE(identity_cache.name);
|
||||
}
|
||||
} /* _PR_CleanupLayerCache */
|
||||
|
||||
/* prlayer.c */
|
||||
|
|
|
@ -447,6 +447,7 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
|
|||
* _PR_XXXCleanup() that we can call here.
|
||||
*/
|
||||
_PR_CleanupThreads();
|
||||
_PR_CleanupLayerCache();
|
||||
_PR_CleanupStacks();
|
||||
_PR_CleanupBeforeExit();
|
||||
_pr_initialized = PR_FALSE;
|
||||
|
|
|
@ -936,6 +936,7 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
|
|||
PR_DestroyLock(pt_book.ml); pt_book.ml = NULL;
|
||||
}
|
||||
_pt_thread_death(me);
|
||||
_PR_CleanupLayerCache();
|
||||
_pr_initialized = PR_FALSE;
|
||||
return PR_SUCCESS;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче