mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-04 07:29:07 +00:00
Add a pref and control mechanism for GGC and disable it.
Tests show nothing but regressions using GGC, even in Mozilla's own microbench for GC. Real-time flippable, if needed.
This commit is contained in:
@@ -1393,6 +1393,18 @@ JS_SetGCParameter(JSRuntime* rt, JSGCParamKey key, uint32_t value)
|
||||
rt->gc.setParameter(key, value);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_SetGGCMode(JSRuntime* rt, bool enabled)
|
||||
{
|
||||
// Control GGC
|
||||
if (enabled && !rt->gc.isGenerationalGCEnabled()) {
|
||||
rt->gc.enableGenerationalGC();
|
||||
} else if (!enabled && rt->gc.isGenerationalGCEnabled()) {
|
||||
rt->gc.disableGenerationalGC();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
JS_PUBLIC_API(uint32_t)
|
||||
JS_GetGCParameter(JSRuntime* rt, JSGCParamKey key)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user