summaryrefslogtreecommitdiffstats
path: root/dom/base/nsJSEnvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsJSEnvironment.cpp')
-rw-r--r--dom/base/nsJSEnvironment.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp
index 1d2eb16885..1397bd25b5 100644
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -2227,6 +2227,21 @@ void nsJSContext::EnsureStatics() {
"javascript.options.mem.gc_max_helper_threads",
(void*)JSGC_MAX_HELPER_THREADS);
+ Preferences::RegisterCallbackAndCall(
+ SetMemoryPrefChangedCallbackInt,
+ "javascript.options.mem.nursery_eager_collection_threshold_kb",
+ (void*)JSGC_NURSERY_EAGER_COLLECTION_THRESHOLD_KB);
+
+ Preferences::RegisterCallbackAndCall(
+ SetMemoryPrefChangedCallbackInt,
+ "javascript.options.mem.nursery_eager_collection_threshold_percent",
+ (void*)JSGC_NURSERY_EAGER_COLLECTION_THRESHOLD_PERCENT);
+
+ Preferences::RegisterCallbackAndCall(
+ SetMemoryPrefChangedCallbackInt,
+ "javascript.options.mem.nursery_eager_collection_timeout_ms",
+ (void*)JSGC_NURSERY_EAGER_COLLECTION_TIMEOUT_MS);
+
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
if (!obs) {
MOZ_CRASH();