Bug 1860411 - Remove the gfx.e10s.font-list.shared pref r=mconley,jfkthame

Differential Revision: https://phabricator.services.mozilla.com/D322404
This commit is contained in:
Exploding-Joysticks
2026-09-01 16:24:45 +00:00
committed by jkew@mozilla.com
parent d9f248df07
commit 629e70803c
3 changed files with 33 additions and 51 deletions
@@ -29,8 +29,6 @@ const LINUX = AppConstants.platform == "linux";
const WIN = AppConstants.platform == "win";
const MAC = AppConstants.platform == "macosx";
const kSharedFontList = SpecialPowers.getBoolPref("gfx.e10s.font-list.shared");
/* This is an object mapping string phases of startup to lists of known cases
* of IO happening on the main thread. Ideally, IO should not be on the main
* thread, and should happen as late as possible (see above).
@@ -249,14 +247,6 @@ const startupPhases = {
ignoreIfUnused: true,
write: 1,
},
{
// Side-effect of bug 1412090, via sandboxing (but the real
// problem there is main-thread CPU use; see bug 1439412)
path: "*ld.so.conf*",
condition: LINUX && !AppConstants.MOZ_CODE_COVERAGE && !kSharedFontList,
read: 22,
close: 11,
},
{
// bug 1541246
path: "ProfD:extensions",
+33 -36
View File
@@ -287,7 +287,6 @@ bool gfxPlatformFontList::Initialize(gfxPlatformFontList* aList) {
sPlatformFontList = aList;
if (XRE_IsParentProcess() &&
StaticPrefs::gfx_font_list_omt_enabled_AtStartup() &&
StaticPrefs::gfx_e10s_font_list_shared_AtStartup() &&
!gfxPlatform::InSafeMode()) {
// We call nsRFPService::CalculateFontLocaleAllowlist so that it reads
// intl.accept_languages while we are still on the main thread.
@@ -783,43 +782,41 @@ bool gfxPlatformFontList::InitFontList() {
InitializeCodepointsWithNoFonts();
// Try to initialize the cross-process shared font list if enabled by prefs.
if (StaticPrefs::gfx_e10s_font_list_shared_AtStartup()) {
for (const auto& entry : mFontEntries.Values()) {
if (!entry) {
continue;
}
AutoWriteLock lock(entry->mLock);
entry->mShmemCharacterMap = nullptr;
entry->mShmemFace = nullptr;
entry->mFamilyName.Truncate();
// Try to initialize the cross-process shared font list.
for (const auto& entry : mFontEntries.Values()) {
if (!entry) {
continue;
}
mFontEntries.Clear();
mShmemCharMaps.Clear();
bool oldSharedList = SharedFontList() != nullptr;
delete mSharedFontList.exchange(new fontlist::FontList(mFontlistInitCount));
InitSharedFontListForPlatform();
auto* newList = SharedFontList();
if (newList && newList->Initialized()) {
if (mLocalNameTable.Count()) {
newList->SetLocalNames(mLocalNameTable);
mLocalNameTable.Clear();
}
AutoWriteLock lock(entry->mLock);
entry->mShmemCharacterMap = nullptr;
entry->mShmemFace = nullptr;
entry->mFamilyName.Truncate();
}
mFontEntries.Clear();
mShmemCharMaps.Clear();
bool oldSharedList = SharedFontList() != nullptr;
delete mSharedFontList.exchange(new fontlist::FontList(mFontlistInitCount));
InitSharedFontListForPlatform();
auto* newList = SharedFontList();
if (newList && newList->Initialized()) {
if (mLocalNameTable.Count()) {
newList->SetLocalNames(mLocalNameTable);
mLocalNameTable.Clear();
}
} else {
// something went wrong, fall back to in-process list
gfxCriticalNote << "Failed to initialize shared font list, "
"falling back to in-process list.";
delete mSharedFontList.exchange(nullptr);
}
if (oldSharedList && XRE_IsParentProcess()) {
// notify all children of the change
if (NS_IsMainThread()) {
dom::ContentParent::NotifyUpdatedFonts(true);
} else {
// something went wrong, fall back to in-process list
gfxCriticalNote << "Failed to initialize shared font list, "
"falling back to in-process list.";
delete mSharedFontList.exchange(nullptr);
}
if (oldSharedList && XRE_IsParentProcess()) {
// notify all children of the change
if (NS_IsMainThread()) {
dom::ContentParent::NotifyUpdatedFonts(true);
} else {
NS_DispatchToMainThread(NS_NewRunnableFunction(
"NotifyUpdatedFonts callback",
[] { dom::ContentParent::NotifyUpdatedFonts(true); }));
}
NS_DispatchToMainThread(NS_NewRunnableFunction(
"NotifyUpdatedFonts callback",
[] { dom::ContentParent::NotifyUpdatedFonts(true); }));
}
}
-5
View File
@@ -7767,11 +7767,6 @@
#endif
mirror: always
- name: gfx.e10s.font-list.shared
type: bool
value: true
mirror: once
# Do we fire a notification about missing fonts, so the front-end can decide
# whether to try and do something about it (e.g. download additional fonts)?
- name: gfx.missing_fonts.notify