mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 721933 - add way to do compartment GC with a reason. r=billm
This commit is contained in:
parent
18e41ee0ff
commit
e182241389
@ -135,6 +135,15 @@ js::GCForReason(JSContext *cx, gcreason::Reason reason)
|
||||
js_GC(cx, NULL, GC_NORMAL, reason);
|
||||
}
|
||||
|
||||
JS_FRIEND_API(void)
|
||||
js::CompartmentGCForReason(JSContext *cx, JSCompartment *comp, gcreason::Reason reason)
|
||||
{
|
||||
/* We cannot GC the atoms compartment alone; use a full GC instead. */
|
||||
JS_ASSERT(comp != cx->runtime->atomsCompartment);
|
||||
|
||||
js_GC(cx, comp, GC_NORMAL, reason);
|
||||
}
|
||||
|
||||
JS_FRIEND_API(void)
|
||||
js::ShrinkingGC(JSContext *cx, gcreason::Reason reason)
|
||||
{
|
||||
|
@ -675,6 +675,9 @@ enum Reason {
|
||||
extern JS_FRIEND_API(void)
|
||||
GCForReason(JSContext *cx, gcreason::Reason reason);
|
||||
|
||||
extern JS_FRIEND_API(void)
|
||||
CompartmentGCForReason(JSContext *cx, JSCompartment *comp, gcreason::Reason reason);
|
||||
|
||||
extern JS_FRIEND_API(void)
|
||||
ShrinkingGC(JSContext *cx, gcreason::Reason reason);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user