diff options
Diffstat (limited to 'xpcom/build')
-rw-r--r-- | xpcom/build/PoisonIOInterposerMac.cpp | 7 | ||||
-rw-r--r-- | xpcom/build/XPCOMInit.cpp | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/xpcom/build/PoisonIOInterposerMac.cpp b/xpcom/build/PoisonIOInterposerMac.cpp index 21eca58757..46dc751221 100644 --- a/xpcom/build/PoisonIOInterposerMac.cpp +++ b/xpcom/build/PoisonIOInterposerMac.cpp @@ -328,10 +328,17 @@ void InitPoisonIOInterposer() { if (!d->Function) { continue; } + + // Disable the interposer on arm64 until there's + // a mach_override_ptr implementation. #ifndef __aarch64__ + // Temporarily disable the interposer on macOS x64 + // while dynamic code disablement rides the trains. +# ifdef MOZ_INTERPOSER_FORCE_MACOS_X64 DebugOnly<mach_error_t> t = mach_override_ptr(d->Function, d->Wrapper, &d->Buffer); MOZ_ASSERT(t == err_none); +# endif // MOZ_INTERPOSER_FORCE_MACOS_X64 #endif } } 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(); |