From f6b7599a3d407319d1cd17619f7c5250b3497f8e Mon Sep 17 00:00:00 2001 From: Butkovits Atila Date: Fri, 11 Aug 2023 01:26:07 +0300 Subject: [PATCH] Backed out changeset ad43d22e453c (bug 1847529) for causing reftest failures. CLOSED TREE --- gfx/thebes/SharedFontList-impl.h | 8 ++-- gfx/thebes/SharedFontList.cpp | 72 +++++++++++++--------------- gfx/thebes/SharedFontList.h | 20 ++------ gfx/thebes/gfxDWriteFontList.cpp | 7 ++- gfx/thebes/gfxDWriteFontList.h | 4 +- gfx/thebes/gfxFontEntry.cpp | 3 +- gfx/thebes/gfxMacPlatformFontList.mm | 6 +-- gfx/thebes/gfxPlatformFontList.cpp | 11 +++-- gfx/thebes/gfxPlatformFontList.h | 11 +++-- gfx/thebes/gfxTextRun.cpp | 2 +- 10 files changed, 63 insertions(+), 81 deletions(-) diff --git a/gfx/thebes/SharedFontList-impl.h b/gfx/thebes/SharedFontList-impl.h index ffd3284933f4..1e1e356fc3a4 100644 --- a/gfx/thebes/SharedFontList-impl.h +++ b/gfx/thebes/SharedFontList-impl.h @@ -173,17 +173,17 @@ class FontList { uint32_t NumFamilies() { return GetHeader().mFamilyCount; } Family* Families() { - return GetHeader().mFamilies.ToArray(this, NumFamilies()); + return static_cast(GetHeader().mFamilies.ToPtr(this)); } uint32_t NumAliases() { return GetHeader().mAliasCount; } Family* AliasFamilies() { - return GetHeader().mAliases.ToArray(this, NumAliases()); + return static_cast(GetHeader().mAliases.ToPtr(this)); } uint32_t NumLocalFaces() { return GetHeader().mLocalFaceCount; } LocalFaceRec* LocalFaces() { - return GetHeader().mLocalFaces.ToArray(this, NumLocalFaces()); + return static_cast(GetHeader().mLocalFaces.ToPtr(this)); } /** @@ -336,7 +336,7 @@ class FontList { Header& GetHeader() { // It's invalid to try and access this before the first block exists. MOZ_ASSERT(mBlocks.Length() > 0); - return *static_cast(mBlocks[0]->Memory()); + return *static_cast(Pointer(0, 0).ToPtr(this)); } /** diff --git a/gfx/thebes/SharedFontList.cpp b/gfx/thebes/SharedFontList.cpp index 473a10c4a7fb..f8cf77dd9fa8 100644 --- a/gfx/thebes/SharedFontList.cpp +++ b/gfx/thebes/SharedFontList.cpp @@ -39,8 +39,7 @@ static double WSSDistance(const Face* aFace, const gfxFontStyle& aStyle) { weightDist * kWeightFactor; } -void* Pointer::ToPtr(FontList* aFontList, - size_t aSize) const MOZ_NO_THREAD_SAFETY_ANALYSIS { +void* Pointer::ToPtr(FontList* aFontList) const MOZ_NO_THREAD_SAFETY_ANALYSIS { if (IsNull()) { return nullptr; } @@ -56,13 +55,13 @@ void* Pointer::ToPtr(FontList* aFontList, // On failure, we'll return null; callers need to handle this appropriately // (e.g. via fallback). void* result = nullptr; - uint32_t blockIndex = Block(); + uint32_t block = Block(); // If the Pointer refers to a block we have not yet mapped in this process, // we first need to retrieve new block handle(s) from the parent and update // our mBlocks list. auto& blocks = aFontList->mBlocks; - if (blockIndex >= blocks.Length()) { + if (block >= blocks.Length()) { if (XRE_IsParentProcess()) { // Shouldn't happen! A content process tried to pass a bad Pointer? goto cleanup; @@ -78,25 +77,18 @@ void* Pointer::ToPtr(FontList* aFontList, if (!isMainThread || !aFontList->UpdateShmBlocks()) { goto cleanup; } - MOZ_ASSERT(blockIndex < blocks.Length(), "failure in UpdateShmBlocks?"); + MOZ_ASSERT(block < blocks.Length(), "failure in UpdateShmBlocks?"); // This is wallpapering bug 1667977; it's unclear if we will always survive // this, as the content process may be unable to shape/render text if all // font lookups are failing. // In at least some cases, however, this can occur transiently while the // font list is being rebuilt by the parent; content will then be notified // that the list has changed, and should refresh everything successfully. - if (blockIndex >= blocks.Length()) { + if (block >= blocks.Length()) { goto cleanup; } } - - { - // Don't create a pointer that's outside what the block has allocated! - const auto& block = blocks[blockIndex]; - if (Offset() + aSize <= block->Allocated()) { - result = static_cast(block->Memory()) + Offset(); - } - } + result = static_cast(blocks[block]->Memory()) + Offset(); cleanup: if (!isMainThread) { @@ -112,7 +104,7 @@ void String::Assign(const nsACString& aString, FontList* aList) { MOZ_ASSERT(mPointer.IsNull()); mLength = aString.Length(); mPointer = aList->Alloc(mLength + 1); - auto* p = mPointer.ToArray(aList, mLength); + char* p = static_cast(mPointer.ToPtr(aList)); std::memcpy(p, aString.BeginReading(), mLength); p[mLength] = '\0'; } @@ -224,14 +216,14 @@ void Family::AddFaces(FontList* aList, const nsTArray& aFaces) { // Allocate space for the face records, and initialize them. // coverity[suspicious_sizeof] Pointer p = aList->Alloc(count * sizeof(Pointer)); - auto* facePtrs = p.ToArray(aList, count); + auto facePtrs = static_cast(p.ToPtr(aList)); for (size_t i = 0; i < count; i++) { if (isSimple && !slots[i]) { facePtrs[i] = Pointer::Null(); } else { const auto* initData = isSimple ? slots[i] : &aFaces[i]; Pointer fp = aList->Alloc(sizeof(Face)); - auto* face = fp.ToPtr(aList); + auto* face = static_cast(fp.ToPtr(aList)); (void)new (face) Face(aList, *initData); facePtrs[i] = fp; if (initData->mCharMap) { @@ -281,7 +273,7 @@ bool Family::FindAllFacesForStyleInternal(FontList* aList, // whether the size is acceptable.) if (NumFaces() == 1) { MOZ_ASSERT(!facePtrs[0].IsNull()); - auto* face = facePtrs[0].ToPtr(aList); + Face* face = static_cast(facePtrs[0].ToPtr(aList)); if (face && face->HasValidDescriptor()) { aFaceList.AppendElement(face); #ifdef MOZ_WIDGET_GTK @@ -312,7 +304,7 @@ bool Family::FindAllFacesForStyleInternal(FontList* aList, (wantItalic ? kItalicMask : 0) | (wantBold ? kBoldMask : 0); // If the desired style is available, use it directly. - auto* face = facePtrs[faceIndex].ToPtr(aList); + Face* face = static_cast(facePtrs[faceIndex].ToPtr(aList)); if (face && face->HasValidDescriptor()) { aFaceList.AppendElement(face); #ifdef MOZ_WIDGET_GTK @@ -337,7 +329,7 @@ bool Family::FindAllFacesForStyleInternal(FontList* aList, for (uint8_t trial = 0; trial < 3; ++trial) { // check remaining faces in order of preference to find the first that // actually exists - face = facePtrs[order[trial]].ToPtr(aList); + face = static_cast(facePtrs[order[trial]].ToPtr(aList)); if (face && face->HasValidDescriptor()) { aFaceList.AppendElement(face); #ifdef MOZ_WIDGET_GTK @@ -372,7 +364,7 @@ bool Family::FindAllFacesForStyleInternal(FontList* aList, // the selected set. bool anyNonScalable = false; for (uint32_t i = 0; i < NumFaces(); i++) { - auto* face = facePtrs[i].ToPtr(aList); + Face* face = static_cast(facePtrs[i].ToPtr(aList)); if (face) { // weight/style/stretch priority: stretch >> style >> weight double distance = WSSDistance(face, aStyle); @@ -473,7 +465,8 @@ Face* Family::FindFaceForStyle(FontList* aList, const gfxFontStyle& aStyle, void Family::SearchAllFontsForChar(FontList* aList, GlobalFontMatch* aMatchData) { - auto* charmap = mCharacterMap.ToPtr(aList); + const SharedBitSet* charmap = + static_cast(mCharacterMap.ToPtr(aList)); if (!charmap) { // If the face list is not yet initialized, or if character maps have // not been loaded, go ahead and do this now (by sending a message to the @@ -485,7 +478,7 @@ void Family::SearchAllFontsForChar(FontList* aList, true)) { return; } - charmap = mCharacterMap.ToPtr(aList); + charmap = static_cast(mCharacterMap.ToPtr(aList)); } if (charmap && !charmap->test(aMatchData->mCh)) { return; @@ -498,13 +491,14 @@ void Family::SearchAllFontsForChar(FontList* aList, return; } for (uint32_t i = 0; i < numFaces; i++) { - auto* face = facePtrs[i].ToPtr(aList); + Face* face = static_cast(facePtrs[i].ToPtr(aList)); if (!face) { continue; } MOZ_ASSERT(face->HasValidDescriptor()); // Get the face's character map, if available (may be null!) - charmap = face->mCharacterMap.ToPtr(aList); + charmap = + static_cast(face->mCharacterMap.ToPtr(aList)); if (charmap) { ++charMapsLoaded; } @@ -562,7 +556,7 @@ void Family::SetFacePtrs(FontList* aList, nsTArray& aFaces) { Pointer slots[4] = {Pointer::Null(), Pointer::Null(), Pointer::Null(), Pointer::Null()}; for (const Pointer& fp : aFaces) { - auto* f = fp.ToPtr(aList); + const Face* f = static_cast(fp.ToPtr(aList)); if (!f->mWeight.IsSingle() || !f->mStyle.IsSingle() || !f->mStretch.IsSingle()) { isSimple = false; @@ -588,7 +582,7 @@ void Family::SetFacePtrs(FontList* aList, nsTArray& aFaces) { if (isSimple) { size_t size = 4 * sizeof(Pointer); mFaces = aList->Alloc(size); - memcpy(mFaces.ToPtr(aList, size), slots, size); + memcpy(mFaces.ToPtr(aList), slots, size); mFaceCount.store(4); mIsSimple = true; return; @@ -596,7 +590,7 @@ void Family::SetFacePtrs(FontList* aList, nsTArray& aFaces) { } size_t size = aFaces.Length() * sizeof(Pointer); mFaces = aList->Alloc(size); - memcpy(mFaces.ToPtr(aList, size), aFaces.Elements(), size); + memcpy(mFaces.ToPtr(aList), aFaces.Elements(), size); mFaceCount.store(aFaces.Length()); } @@ -623,18 +617,18 @@ void Family::SetupFamilyCharMap(FontList* aList) { } gfxSparseBitSet familyMap; Pointer firstMapShmPointer; - const SharedBitSet* firstMap = nullptr; + SharedBitSet* firstMap = nullptr; bool merged = false; Pointer* faces = Faces(aList); if (!faces) { return; } for (size_t i = 0; i < NumFaces(); i++) { - auto* f = faces[i].ToPtr(aList); + auto f = static_cast(faces[i].ToPtr(aList)); if (!f) { continue; // Skip missing face (in an incomplete "simple" family) } - auto* faceMap = f->mCharacterMap.ToPtr(aList); + auto faceMap = static_cast(f->mCharacterMap.ToPtr(aList)); if (!faceMap) { continue; // If there's a face where setting up the cmap failed, we skip // it as unusable. @@ -959,9 +953,7 @@ void FontList::SetFamilyNames(nsTArray& aFamilies) { return; } - // We can't call Families() here because the mFamilyCount field has not yet - // been set! - auto* families = header.mFamilies.ToArray(this, count); + Family* families = static_cast(header.mFamilies.ToPtr(this)); for (size_t i = 0; i < count; i++) { (void)new (&families[i]) Family(this, aFamilies[i]); LOG_FONTLIST(("(shared-fontlist) family %u (%s)", (unsigned)i, @@ -996,7 +988,7 @@ void FontList::SetAliases( return; } fontlist::Pointer ptr = Alloc(count * sizeof(Family)); - auto* aliases = ptr.ToArray(this, count); + Family* aliases = static_cast(ptr.ToPtr(this)); for (size_t i = 0; i < count; i++) { (void)new (&aliases[i]) Family(this, aliasArray[i]); LOG_FONTLIST(("(shared-fontlist) alias family %u (%s: %s)", (unsigned)i, @@ -1005,7 +997,7 @@ void FontList::SetAliases( if (LOG_FONTLIST_ENABLED()) { const auto& faces = aAliasTable.Get(aliasArray[i].mKey)->mFaces; for (unsigned j = 0; j < faces.Length(); j++) { - auto* face = faces[j].ToPtr(this); + auto face = static_cast(faces[j].ToPtr(this)); const nsCString& desc = face->mDescriptor.AsString(this); nsAutoCString weight, style, stretch; face->mWeight.ToString(weight); @@ -1038,7 +1030,7 @@ void FontList::SetLocalNames( size_t count = faceArray.Length(); Family* families = Families(); fontlist::Pointer ptr = Alloc(count * sizeof(LocalFaceRec)); - auto* faces = ptr.ToArray(this, count); + LocalFaceRec* faces = static_cast(ptr.ToPtr(this)); for (size_t i = 0; i < count; i++) { (void)new (&faces[i]) LocalFaceRec(); const auto& rec = aLocalNameTable.Get(faceArray[i]); @@ -1059,7 +1051,7 @@ void FontList::SetLocalNames( static_cast(family->Faces(this)); for (uint32_t j = 0; j < family->NumFaces(); j++) { if (!faceList[j].IsNull()) { - auto* f = faceList[j].ToPtr(this); + const Face* f = static_cast(faceList[j].ToPtr(this)); if (f && rec.mFaceDescriptor == f->mDescriptor.AsString(this)) { faces[i].mFaceIndex = j; break; @@ -1116,7 +1108,7 @@ Family* FontList::FindFamily(const nsCString& aName, bool aPrimaryNameOnly) { const nsCString& mTarget; }; - const Header& header = GetHeader(); + Header& header = GetHeader(); Family* families = Families(); if (!families) { @@ -1268,7 +1260,7 @@ void FontList::SearchForLocalFace(const nsACString& aName, Family** aFamily, continue; } for (uint32_t j = 0; j < family->NumFaces(); j++) { - auto* face = faces[j].ToPtr(this); + Face* face = static_cast(faces[j].ToPtr(this)); if (!face) { continue; } diff --git a/gfx/thebes/SharedFontList.h b/gfx/thebes/SharedFontList.h index f2eaf2822377..8d97785e7aea 100644 --- a/gfx/thebes/SharedFontList.h +++ b/gfx/thebes/SharedFontList.h @@ -70,23 +70,11 @@ struct Pointer { * FontList, which will know where the shared memory block is mapped in * the current process's address space. * - * aSize is the expected size of the pointed-to object, for bounds checking. - * * NOTE! * In child processes this may fail and return nullptr, even if IsNull() is * false, in cases where the font list is in the process of being rebuilt. */ - void* ToPtr(FontList* aFontList, size_t aSize) const; - - template - T* ToPtr(FontList* aFontList) const { - return static_cast(ToPtr(aFontList, sizeof(T))); - } - - template - T* ToArray(FontList* aFontList, size_t aCount) const { - return static_cast(ToPtr(aFontList, sizeof(T) * aCount)); - } + void* ToPtr(FontList* aFontList) const; Pointer& operator=(const Pointer& aOther) { mBlockAndOffset.store(aOther.mBlockAndOffset); @@ -123,14 +111,14 @@ struct String { // allocate or copy. But that's unsafe because in the event of font-list // reinitalization, that shared memory will be unmapped; then any copy of // the nsCString that may still be around will crash if accessed. - return nsCString(mPointer.ToArray(aList, mLength), mLength); + return nsCString(static_cast(mPointer.ToPtr(aList)), mLength); } void Assign(const nsACString& aString, FontList* aList); const char* BeginReading(FontList* aList) const { MOZ_ASSERT(!mPointer.IsNull()); - auto* str = mPointer.ToArray(aList, mLength); + auto str = static_cast(mPointer.ToPtr(aList)); return str ? str : ""; } @@ -296,7 +284,7 @@ struct Family { Pointer* Faces(FontList* aList) const { MOZ_ASSERT(IsInitialized()); - return mFaces.ToArray(aList, mFaceCount); + return static_cast(mFaces.ToPtr(aList)); } FontVisibility Visibility() const { return mVisibility; } diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index 96729b2b9e6b..5ad082be6504 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -1356,9 +1356,8 @@ void gfxDWriteFontList::GetFacesInitDataForFamily( } } -bool gfxDWriteFontList::ReadFaceNames(const fontlist::Family* aFamily, - const fontlist::Face* aFace, - nsCString& aPSName, +bool gfxDWriteFontList::ReadFaceNames(fontlist::Family* aFamily, + fontlist::Face* aFace, nsCString& aPSName, nsCString& aFullName) { IDWriteFontCollection* collection = #ifdef MOZ_BUNDLED_FONTS @@ -1463,7 +1462,7 @@ void gfxDWriteFontList::ReadFaceNamesForFamily( // Read PS-names and fullnames of the faces, and any alternate family names // (either localizations or legacy subfamily names) for (unsigned i = 0; i < aFamily->NumFaces(); ++i) { - auto* face = facePtrs[i].ToPtr(list); + auto face = static_cast(facePtrs[i].ToPtr(list)); if (!face) { continue; } diff --git a/gfx/thebes/gfxDWriteFontList.h b/gfx/thebes/gfxDWriteFontList.h index 3ff0e6f7c51c..ed7644b15f1c 100644 --- a/gfx/thebes/gfxDWriteFontList.h +++ b/gfx/thebes/gfxDWriteFontList.h @@ -392,8 +392,8 @@ class gfxDWriteFontList final : public gfxPlatformFontList { bool aNeedFullnamePostscriptNames) MOZ_REQUIRES(mLock) override; - bool ReadFaceNames(const mozilla::fontlist::Family* aFamily, - const mozilla::fontlist::Face* aFace, nsCString& aPSName, + bool ReadFaceNames(mozilla::fontlist::Family* aFamily, + mozilla::fontlist::Face* aFace, nsCString& aPSName, nsCString& aFullName) override; void GetFacesInitDataForFamily( diff --git a/gfx/thebes/gfxFontEntry.cpp b/gfx/thebes/gfxFontEntry.cpp index 99a32947a086..4150748cf502 100644 --- a/gfx/thebes/gfxFontEntry.cpp +++ b/gfx/thebes/gfxFontEntry.cpp @@ -157,7 +157,8 @@ void gfxFontEntry::InitializeFrom(fontlist::Face* aFace, bool gfxFontEntry::TrySetShmemCharacterMap() { MOZ_ASSERT(mShmemFace); auto list = gfxPlatformFontList::PlatformFontList()->SharedFontList(); - auto* shmemCmap = mShmemFace->mCharacterMap.ToPtr(list); + const auto* shmemCmap = + static_cast(mShmemFace->mCharacterMap.ToPtr(list)); mShmemCharacterMap.exchange(shmemCmap); return shmemCmap != nullptr; } diff --git a/gfx/thebes/gfxMacPlatformFontList.mm b/gfx/thebes/gfxMacPlatformFontList.mm index b95c6fa1d141..1b89371be5c9 100644 --- a/gfx/thebes/gfxMacPlatformFontList.mm +++ b/gfx/thebes/gfxMacPlatformFontList.mm @@ -1402,7 +1402,7 @@ void gfxMacPlatformFontList::InitAliasesForSingleFaceList() { if (facePtrs[i].IsNull()) { continue; } - auto* face = facePtrs[i].ToPtr(list); + auto face = static_cast(facePtrs[i].ToPtr(list)); if (face->mDescriptor.AsString(list).Equals(aliasName)) { // Found it! Create an entry in the Alias table. GenerateFontListKey(aliasName, key); @@ -2187,9 +2187,9 @@ void gfxMacPlatformFontList::ReadFaceNamesForFamily(fontlist::Family* aFamily, const uint32_t kNAME = TRUETYPE_TAG('n', 'a', 'm', 'e'); fontlist::FontList* list = SharedFontList(); nsAutoCString canonicalName(aFamily->DisplayName().AsString(list)); - const auto* facePtrs = aFamily->Faces(list); + const fontlist::Pointer* facePtrs = aFamily->Faces(list); for (uint32_t i = 0, n = aFamily->NumFaces(); i < n; i++) { - auto* face = facePtrs[i].ToPtr(list); + auto face = static_cast(facePtrs[i].ToPtr(list)); if (!face) { continue; } diff --git a/gfx/thebes/gfxPlatformFontList.cpp b/gfx/thebes/gfxPlatformFontList.cpp index 16b323924fc9..52aa16c43591 100644 --- a/gfx/thebes/gfxPlatformFontList.cpp +++ b/gfx/thebes/gfxPlatformFontList.cpp @@ -860,7 +860,8 @@ gfxFontEntry* gfxPlatformFontList::LookupInSharedFaceNameList( auto* families = list->Families(); if (families) { family = &families[rec->mFamilyIndex]; - face = family->Faces(list)[rec->mFaceIndex].ToPtr(list); + face = static_cast( + family->Faces(list)[rec->mFaceIndex].ToPtr(list)); } } } else { @@ -1743,7 +1744,7 @@ bool gfxPlatformFontList::InitializeFamily(fontlist::Family* aFamily, auto* faces = aFamily->Faces(list); if (faces) { for (size_t i = 0; i < aFamily->NumFaces(); i++) { - auto* face = faces[i].ToPtr(list); + auto* face = static_cast(faces[i].ToPtr(list)); if (face && face->mCharacterMap.IsNull()) { // We don't want to cache this font entry, as the parent will most // likely never use it again; it's just to populate the charmap for @@ -1887,7 +1888,7 @@ ShmemCharMapHashEntry::ShmemCharMapHashEntry(const gfxSparseBitSet* aCharMap) mHash(aCharMap->GetChecksum()) { size_t len = SharedBitSet::RequiredSize(*aCharMap); mCharMap = mList->Alloc(len); - SharedBitSet::Create(mCharMap.ToPtr(mList, len), len, *aCharMap); + SharedBitSet::Create(mCharMap.ToPtr(mList), len, *aCharMap); } fontlist::Pointer gfxPlatformFontList::GetShmemCharMapLocked( @@ -2981,7 +2982,7 @@ void gfxPlatformFontList::SetCharacterMap(uint32_t aGeneration, if (AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownConfirmed)) { return; } - auto* face = aFacePtr.ToPtr(list); + fontlist::Face* face = static_cast(aFacePtr.ToPtr(list)); if (face) { face->mCharacterMap = GetShmemCharMap(&aMap); } @@ -3009,7 +3010,7 @@ void gfxPlatformFontList::SetupFamilyCharMap( // should have hit the MOZ_DIAGNOSTIC_ASSERT in FontList::ToSharedPointer // rather than passing a null or bad pointer to the parent.) - auto* family = aFamilyPtr.ToPtr(list); + auto* family = static_cast(aFamilyPtr.ToPtr(list)); if (!family) { // Unable to resolve to a native pointer (or it was null). NS_WARNING("unexpected null Family pointer"); diff --git a/gfx/thebes/gfxPlatformFontList.h b/gfx/thebes/gfxPlatformFontList.h index 6ba5c86ed762..3d5edfc8699e 100644 --- a/gfx/thebes/gfxPlatformFontList.h +++ b/gfx/thebes/gfxPlatformFontList.h @@ -112,7 +112,8 @@ class ShmemCharMapHashEntry final : public PLDHashEntryHdr { return false; } - return mCharMap.ToPtr(mList)->Equals(aCharMap); + return static_cast(mCharMap.ToPtr(mList)) + ->Equals(aCharMap); } static KeyTypePointer KeyToPointer(KeyType aCharMap) { return aCharMap; } @@ -411,9 +412,9 @@ class gfxPlatformFontList : public gfxFontInfoLoader { * Read PSName and FullName of the given face, for src:local lookup, * returning true if actually implemented and succeeded. */ - virtual bool ReadFaceNames(const mozilla::fontlist::Family* aFamily, - const mozilla::fontlist::Face* aFace, - nsCString& aPSName, nsCString& aFullName) { + virtual bool ReadFaceNames(mozilla::fontlist::Family* aFamily, + mozilla::fontlist::Face* aFace, nsCString& aPSName, + nsCString& aFullName) { return false; } @@ -1042,7 +1043,7 @@ class gfxPlatformFontList : public gfxFontInfoLoader { nsTHashMap mLocalNameTable; - nsRefPtrHashtable, gfxFontEntry> + nsRefPtrHashtable, gfxFontEntry> mFontEntries MOZ_GUARDED_BY(mLock); mozilla::UniquePtr mFontPrefs; diff --git a/gfx/thebes/gfxTextRun.cpp b/gfx/thebes/gfxTextRun.cpp index 0ae543b8e632..ef0ea7b6e352 100644 --- a/gfx/thebes/gfxTextRun.cpp +++ b/gfx/thebes/gfxTextRun.cpp @@ -1993,7 +1993,7 @@ void gfxFontGroup::AddFamilyToFontList(fontlist::Family* aFamily, } AutoTArray faceList; aFamily->FindAllFacesForStyle(pfl->SharedFontList(), mStyle, faceList); - for (auto* face : faceList) { + for (auto face : faceList) { gfxFontEntry* fe = pfl->GetOrCreateFontEntry(face, aFamily); if (fe && !HasFont(fe)) { FamilyFace ff(aFamily, fe, aGeneric);