Pier Angelo Vendrame pushed to branch base-browser-128.5.0esr-14.5-1 at The Tor
Project / Applications / Tor Browser
Commits:
5b784090 by Pier Angelo Vendrame at 2024-12-02T09:08:41+01:00
fixup! Bug 43140: Tighten up fonts on Linux.
Bug 43330: System fonts leak when emptying the allow list on Linux.
It seems for some reason we still need to define the configuration path
and the file separately.
- - - - -
1 changed file:
- gfx/thebes/gfxFcPlatformFontList.cpp
Changes:
=====================================
gfx/thebes/gfxFcPlatformFontList.cpp
=====================================
@@ -1356,20 +1356,20 @@ static nsresult SetFontconfigConfigFile() {
nsCOMPtr<nsIProperties> dirSvc(
do_GetService("@mozilla.org/file/directory_service;1"));
NS_ENSURE_TRUE(dirSvc, NS_ERROR_NOT_AVAILABLE);
- nsCOMPtr<nsIFile> appFile, confFile;
+ nsCOMPtr<nsIFile> appFile, confDir;
nsresult rv = dirSvc->Get(XRE_EXECUTABLE_FILE, NS_GET_IID(nsIFile),
getter_AddRefs(appFile));
NS_ENSURE_SUCCESS(rv, rv);
- rv = appFile->GetParent(getter_AddRefs(confFile));
+ rv = appFile->GetParent(getter_AddRefs(confDir));
NS_ENSURE_SUCCESS(rv, rv);
- rv = confFile->AppendNative("fonts"_ns);
- NS_ENSURE_SUCCESS(rv, rv);
- rv = confFile->AppendNative("fonts.conf"_ns);
+ rv = confDir->AppendNative("fonts"_ns);
NS_ENSURE_SUCCESS(rv, rv);
nsAutoCString confPath;
- rv = confFile->GetNativePath(confPath);
- if (setenv("FONTCONFIG_FILE", confPath.BeginReading(), 1) != 0) {
+ rv = confDir->GetNativePath(confPath);
+ NS_ENSURE_SUCCESS(rv, rv);
+ if (NS_WARN_IF(setenv("FONTCONFIG_PATH", confPath.BeginReading(), 1) != 0 ||
+ setenv("FONTCONFIG_FILE", "fonts.conf", 1) != 0)) {
return NS_ERROR_FAILURE;
}
return NS_OK;
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5b784090c14f93394f188cec4263a800b2218cf9
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5b784090c14f93394f188cec4263a800b2218cf9
You're receiving this email because of your account on gitlab.torproject.org.
_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]