зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
82a218ebec
Коммит
ba4d6a252b
|
@ -1072,6 +1072,17 @@ static void InitDtoa(void)
|
||||||
}
|
}
|
||||||
#endif
|
#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 */
|
/* nspr2 watcom bug ifdef omitted */
|
||||||
|
|
||||||
|
|
|
@ -459,6 +459,9 @@ js_SetupLocks(int l, int g)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// pull in the cleanup function from jsdtoa.c
|
||||||
|
extern void js_FinishDtoa(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
js_CleanupLocks()
|
js_CleanupLocks()
|
||||||
{
|
{
|
||||||
|
@ -484,6 +487,7 @@ js_CleanupLocks()
|
||||||
PR_DestroyLock(_compare_and_swap_lock);
|
PR_DestroyLock(_compare_and_swap_lock);
|
||||||
_compare_and_swap_lock = NULL;
|
_compare_and_swap_lock = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
js_FinishDtoa();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче