From da4c7e7ed675c3bf405668739c3012d140856109 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:42 +0200 Subject: Adding upstream version 126.0. Signed-off-by: Daniel Baumann --- xpcom/build/XPCOMInit.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'xpcom/build/XPCOMInit.cpp') 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(); -- cgit v1.2.3