summaryrefslogtreecommitdiffstats
path: root/xpcom/build/XPCOMInit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xpcom/build/XPCOMInit.cpp')
-rw-r--r--xpcom/build/XPCOMInit.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/xpcom/build/XPCOMInit.cpp b/xpcom/build/XPCOMInit.cpp
index 4d6572a501..6275ca9c53 100644
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -233,6 +233,11 @@ static void InitializeJS() {
JS::SetAVXEnabled(mozilla::StaticPrefs::javascript_options_wasm_simd_avx());
#endif
+ if (XRE_IsParentProcess() &&
+ mozilla::StaticPrefs::javascript_options_main_process_disable_jit()) {
+ JS::DisableJitBackend();
+ }
+
// Set all JS::Prefs.
SET_JS_PREFS_FROM_BROWSER_PREFS;
@@ -320,6 +325,8 @@ NS_InitXPCOM(nsIServiceManager** aResult, nsIFile* aBinDirectory,
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
+
+ // Initialise the profiler
AUTO_PROFILER_INIT2;
// Set up the timer globals/timer thread
@@ -459,6 +466,11 @@ NS_InitXPCOM(nsIServiceManager** aResult, nsIFile* aBinDirectory,
// to the directory service.
nsDirectoryService::gService->RegisterCategoryProviders();
+ // Now that both the profiler and directory services have been started
+ // we can find the download directory, where the profiler can write
+ // profiles if necessary
+ profiler_lookup_download_directory();
+
// Init mozilla::SharedThreadPool (which needs the service manager).
mozilla::SharedThreadPool::InitStatics();