Fix to 54307. Patch courtesy Jon Smirl <jon@mediaone.net>.

Clean up several locks that jsdtoa uses, when JS_THREADSAFE.

a=brendan
r=mccabe
This commit is contained in:
mccabe%netscape.com 2000-09-28 05:14:32 +00:00
parent 6db4f18f0b
commit fe00fedb87
2 changed files with 15 additions and 0 deletions

View File

@ -1072,6 +1072,17 @@ static void InitDtoa(void)
}
#endif
void js_FinishDtoa(void)
{
#ifdef JS_THREADSAFE
if (initialized == JS_TRUE)
{
PR_DestroyLock(freelist_lock);
PR_DestroyLock(p5s_lock);
initialized = JS_FALSE;
}
#endif
}
/* nspr2 watcom bug ifdef omitted */

View File

@ -459,6 +459,9 @@ js_SetupLocks(int l, int g)
return 1;
}
// pull in the cleanup function from jsdtoa.c
extern void js_FinishDtoa(void);
void
js_CleanupLocks()
{
@ -484,6 +487,7 @@ js_CleanupLocks()
PR_DestroyLock(_compare_and_swap_lock);
_compare_and_swap_lock = NULL;
#endif
js_FinishDtoa();
}
}