From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- dom/workers/RuntimeService.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'dom/workers/RuntimeService.cpp') 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(); -- cgit v1.2.3