summaryrefslogtreecommitdiffstats
path: root/dom/workers/RuntimeService.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/workers/RuntimeService.cpp
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-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/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();