diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /dom/base/nsJSEnvironment.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz firefox-adbda400be353e676059e335c3c0aaf99e719475.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/base/nsJSEnvironment.cpp')
-rw-r--r-- | dom/base/nsJSEnvironment.cpp | 15 |
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(); |