зеркало из https://github.com/mozilla/pjs.git
Bug 716014, use compartment gc more often, JS API part, r=terrence
--HG-- extra : rebase_source : c61a7552611cfbb0ce39bfee7787da57bec5a637
This commit is contained in:
Родитель
d7fa29d6cf
Коммит
03b9baceb0
|
@ -144,6 +144,17 @@ js::PrepareForFullGC(JSRuntime *rt)
|
|||
c->scheduleGC();
|
||||
}
|
||||
|
||||
JS_FRIEND_API(bool)
|
||||
js::IsGCScheduled(JSRuntime *rt)
|
||||
{
|
||||
for (CompartmentsIter c(rt); !c.done(); c.next()) {
|
||||
if (c->isGCScheduled())
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
JS_FRIEND_API(void)
|
||||
js::GCForReason(JSRuntime *rt, gcreason::Reason reason)
|
||||
{
|
||||
|
|
|
@ -651,6 +651,9 @@ PrepareCompartmentForGC(JSCompartment *comp);
|
|||
extern JS_FRIEND_API(void)
|
||||
PrepareForFullGC(JSRuntime *rt);
|
||||
|
||||
extern JS_FRIEND_API(bool)
|
||||
IsGCScheduled(JSRuntime *rt);
|
||||
|
||||
/*
|
||||
* When triggering a GC using one of the functions below, it is first necessary
|
||||
* to select the compartments to be collected. To do this, you can call
|
||||
|
|
Загрузка…
Ссылка в новой задаче