From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- dom/base/nsJSEnvironment.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'dom/base/nsJSEnvironment.cpp') 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 obs = mozilla::services::GetObserverService(); if (!obs) { MOZ_CRASH(); -- cgit v1.2.3