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:
wolfbeast
2016-07-29 17:58:00 +02:00
committed by roytam1
parent f9aba83ef9
commit 1659ac189a
4 changed files with 21 additions and 0 deletions
+12
View File
@@ -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)
{