зеркало из https://github.com/mozilla/pjs.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:
Родитель
07c8828660
Коммит
8ce380c12c
|
@ -1735,6 +1735,7 @@ extern void _PR_InitMW(void);
|
||||||
extern void _PR_InitRWLocks(void);
|
extern void _PR_InitRWLocks(void);
|
||||||
extern void _PR_NotifyCondVar(PRCondVar *cvar, PRThread *me);
|
extern void _PR_NotifyCondVar(PRCondVar *cvar, PRThread *me);
|
||||||
extern void _PR_CleanupThread(PRThread *thread);
|
extern void _PR_CleanupThread(PRThread *thread);
|
||||||
|
extern void _PR_CleanupLayerCache(void);
|
||||||
extern void _PR_CleanupStacks(void);
|
extern void _PR_CleanupStacks(void);
|
||||||
extern void _PR_CleanupThreads(void);
|
extern void _PR_CleanupThreads(void);
|
||||||
extern void _PR_CleanupTPD(void);
|
extern void _PR_CleanupTPD(void);
|
||||||
|
|
|
@ -743,4 +743,23 @@ void _PR_InitLayerCache()
|
||||||
PR_ASSERT(NULL != identity_cache.ml);
|
PR_ASSERT(NULL != identity_cache.ml);
|
||||||
} /* _PR_InitLayerCache */
|
} /* _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 */
|
/* prlayer.c */
|
||||||
|
|
|
@ -447,6 +447,7 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
|
||||||
* _PR_XXXCleanup() that we can call here.
|
* _PR_XXXCleanup() that we can call here.
|
||||||
*/
|
*/
|
||||||
_PR_CleanupThreads();
|
_PR_CleanupThreads();
|
||||||
|
_PR_CleanupLayerCache();
|
||||||
_PR_CleanupStacks();
|
_PR_CleanupStacks();
|
||||||
_PR_CleanupBeforeExit();
|
_PR_CleanupBeforeExit();
|
||||||
_pr_initialized = PR_FALSE;
|
_pr_initialized = PR_FALSE;
|
||||||
|
|
|
@ -936,6 +936,7 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
|
||||||
PR_DestroyLock(pt_book.ml); pt_book.ml = NULL;
|
PR_DestroyLock(pt_book.ml); pt_book.ml = NULL;
|
||||||
}
|
}
|
||||||
_pt_thread_death(me);
|
_pt_thread_death(me);
|
||||||
|
_PR_CleanupLayerCache();
|
||||||
_pr_initialized = PR_FALSE;
|
_pr_initialized = PR_FALSE;
|
||||||
return PR_SUCCESS;
|
return PR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче