mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
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:
parent
6db4f18f0b
commit
fe00fedb87
@ -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 */
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user