summaryrefslogtreecommitdiffstats
path: root/dom/workers/RuntimeService.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /dom/workers/RuntimeService.cpp
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/workers/RuntimeService.cpp')
-rw-r--r--dom/workers/RuntimeService.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp
index 3d6a883867..02efb12053 100644
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -369,6 +369,14 @@ void LoadJSGCMemoryOptions(const char* aPrefName, void* /* aClosure */) {
PREF("gc_min_empty_chunk_count", JSGC_MIN_EMPTY_CHUNK_COUNT),
PREF("gc_max_empty_chunk_count", JSGC_MAX_EMPTY_CHUNK_COUNT),
PREF("gc_compacting", JSGC_COMPACTING_ENABLED),
+ PREF("gc_parallel_marking", JSGC_PARALLEL_MARKING_ENABLED),
+ PREF("gc_parallel_marking_threshold_mb",
+ JSGC_PARALLEL_MARKING_THRESHOLD_MB),
+ // Note: Workers do not currently trigger eager minor GC, but if that is
+ // desired the following parameters should be added:
+ // javascript.options.mem.nursery_eager_collection_threshold_kb
+ // javascript.options.mem.nursery_eager_collection_threshold_percent
+ // javascript.options.mem.nursery_eager_collection_timeout_ms
};
#undef PREF
@@ -439,6 +447,7 @@ void LoadJSGCMemoryOptions(const char* aPrefName, void* /* aClosure */) {
case JSGC_MIN_EMPTY_CHUNK_COUNT:
case JSGC_MAX_EMPTY_CHUNK_COUNT:
case JSGC_HEAP_GROWTH_FACTOR:
+ case JSGC_PARALLEL_MARKING_THRESHOLD_MB:
UpdateCommonJSGCMemoryOption(rts, pref->fullName, pref->key);
break;
default:
@@ -1410,10 +1419,16 @@ nsresult RuntimeService::Init() {
Preferences::GetInt(PREF_WORKERS_MAX_PER_DOMAIN, MAX_WORKERS_PER_DOMAIN);
gMaxWorkersPerDomain = std::max(0, maxPerDomain);
- if (NS_WARN_IF(!IndexedDatabaseManager::GetOrCreate())) {
+ IndexedDatabaseManager* idm = IndexedDatabaseManager::GetOrCreate();
+ if (NS_WARN_IF(!idm)) {
return NS_ERROR_UNEXPECTED;
}
+ rv = idm->EnsureLocale();
+ if (NS_WARN_IF(NS_FAILED(rv))) {
+ return rv;
+ }
+
// PerformanceService must be initialized on the main-thread.
PerformanceService::GetOrCreate();