Files
tubestation/js
Nazım Can Altınova 6a3ed07194 Bug 1962880 - Get the download directory correctly for the profiler POSIX signal profiling a=pascalc
We were using `NS_GetSpecialDirectory(NS_OS_DEFAULT_DOWNLOAD_DIR, ...)`
before for getting the download directory for the profiler POSIX signal
profiling. But this ignores the user-set download directory and always
use the default downloads folder. And while doing so, it creates this
default folder even if the user set it to another one.

Now we are using `GetPreferredDownloadsDirectory` directly which looks
for the user-set download directory first and uses it if it find one.

We had to change the location we call profiler_lookup_async_signal_dump_directory
because in that location user-defined prefs weren't fully initialized
yet in NS_InitXPCOM. Moved it inside `XREMain::XRE_mainRun`. Note that
there is a small behavior change here. Previously that function was
being called in *every process*, and now it's being called only in the
parent process. This is actually the desired behavior because we can't
capture profiles by directly sending POSIX signals to child processes
due to sandboxing restrictions.

Original Revision: https://phabricator.services.mozilla.com/D254342

Differential Revision: https://phabricator.services.mozilla.com/D256960
2025-07-11 09:37:27 +00:00
..