summaryrefslogtreecommitdiffstats
path: root/dom/workers/RuntimeService.cpp
diff options
context:
space:
mode:
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();