tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit ab0a72de50974ccb91e61cf67a0205109be1a6b2
parent 38d201b25385de875ef14751ab6dbadbfde08147
Author: Jonathan Kew <jkew@mozilla.com>
Date:   Tue, 18 Nov 2025 21:48:28 +0000

Bug 2000163 - Rework webfont memory reporting to avoid double-accounting on Windows. r=gfx-reviewers,lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D273005

Diffstat:
Mgfx/thebes/CoreTextFontList.cpp | 9+++++++++
Mgfx/thebes/CoreTextFontList.h | 8++++++++
Mgfx/thebes/gfxDWriteCommon.cpp | 109++++++++++++++++++++-----------------------------------------------------------
Mgfx/thebes/gfxDWriteCommon.h | 67++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
Mgfx/thebes/gfxDWriteFontList.cpp | 12+++++++++++-
Mgfx/thebes/gfxDWriteFontList.h | 7+++++--
Mgfx/thebes/gfxDWriteFonts.h | 1+
Mgfx/thebes/gfxFT2FontBase.cpp | 13+++++++++++++
Mgfx/thebes/gfxFT2FontBase.h | 11+++++++++++
Mgfx/thebes/gfxFT2FontList.h | 2+-
Mgfx/thebes/gfxFcPlatformFontList.h | 2+-
Mgfx/thebes/gfxFontEntry.cpp | 18+++++-------------
Mgfx/thebes/gfxFontEntry.h | 9++-------
Mgfx/thebes/gfxUserFontSet.cpp | 13-------------
14 files changed, 156 insertions(+), 125 deletions(-)

diff --git a/gfx/thebes/CoreTextFontList.cpp b/gfx/thebes/CoreTextFontList.cpp @@ -1491,6 +1491,8 @@ static void ReleaseData(void* info, const void* data, size_t size) { free((void*)data); } +MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(UserFontMallocSizeOfOnAlloc) + gfxFontEntry* CoreTextFontList::MakePlatformFont(const nsACString& aFontName, WeightRange aWeightForEntry, StretchRange aStretchForEntry, @@ -1520,6 +1522,13 @@ gfxFontEntry* CoreTextFontList::MakePlatformFont(const nsACString& aFontName, auto newFontEntry = MakeUnique<CTFontEntry>( NS_ConvertUTF16toUTF8(uniqueName), fontRef, aWeightForEntry, aStretchForEntry, aStyleForEntry, true, false); + + // Record size for memory reporting purposes. + // The *OnAlloc function will also tell DMD about this block, as the + // OS font code may hold on to it for an extended period. + newFontEntry->mComputedSizeOfUserFont = + UserFontMallocSizeOfOnAlloc(aFontData); + return newFontEntry.release(); } diff --git a/gfx/thebes/CoreTextFontList.h b/gfx/thebes/CoreTextFontList.h @@ -77,6 +77,12 @@ class CTFontEntry final : public gfxFontEntry { bool SupportsOpenTypeFeature(Script aScript, uint32_t aFeatureTag) override; + size_t ComputedSizeOfExcludingThis( + mozilla::MallocSizeOf aMallocSizeOf) override { + return gfxFontEntry::ComputedSizeOfExcludingThis(aMallocSizeOf) + + mComputedSizeOfUserFont; + } + protected: gfxFont* CreateFontInstance(const gfxFontStyle* aFontStyle) override; @@ -111,6 +117,8 @@ class CTFontEntry final : public gfxFontEntry { nsTHashtable<nsUint32HashKey> mAvailableTables MOZ_GUARDED_BY(mLock); mozilla::ThreadSafeWeakPtr<mozilla::gfx::UnscaledFontMac> mUnscaledFont; + + size_t mComputedSizeOfUserFont = 0; }; class CTFontFamily : public gfxFontFamily { diff --git a/gfx/thebes/gfxDWriteCommon.cpp b/gfx/thebes/gfxDWriteCommon.cpp @@ -7,90 +7,34 @@ #include <unordered_map> -#include "mozilla/Atomics.h" #include "mozilla/StaticMutex.h" #include "mozilla/gfx/Logging.h" class gfxDWriteFontFileStream; -static mozilla::StaticMutex sFontFileStreamsMutex MOZ_UNANNOTATED; +using namespace mozilla; + +static StaticMutex sFontFileStreamsMutex MOZ_UNANNOTATED; static uint64_t sNextFontFileKey = 0; MOZ_RUNINIT static std::unordered_map<uint64_t, gfxDWriteFontFileStream*> sFontFileStreams; IDWriteFontFileLoader* gfxDWriteFontFileLoader::mInstance = nullptr; -class gfxDWriteFontFileStream final : public IDWriteFontFileStream { - public: - /** - * Used by the FontFileLoader to create a new font stream, - * this font stream is created from data in memory. The memory - * passed may be released after object creation, it will be - * copied internally. - * - * @param aData Font data - */ - gfxDWriteFontFileStream(const uint8_t* aData, uint32_t aLength, - uint64_t aFontFileKey); - ~gfxDWriteFontFileStream(); - - // IUnknown interface - IFACEMETHOD(QueryInterface)(IID const& iid, OUT void** ppObject) { - if (iid == __uuidof(IDWriteFontFileStream)) { - *ppObject = static_cast<IDWriteFontFileStream*>(this); - return S_OK; - } else if (iid == __uuidof(IUnknown)) { - *ppObject = static_cast<IUnknown*>(this); - return S_OK; - } else { - return E_NOINTERFACE; - } - } - - IFACEMETHOD_(ULONG, AddRef)() { - MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt"); - return ++mRefCnt; - } - - IFACEMETHOD_(ULONG, Release)() { - MOZ_ASSERT(0 != mRefCnt, "dup release"); - uint32_t count = --mRefCnt; - if (count == 0) { - // Avoid locking unless necessary. Verify the refcount hasn't changed - // while locked. Delete within the scope of the lock when zero. - mozilla::StaticMutexAutoLock lock(sFontFileStreamsMutex); - if (0 != mRefCnt) { - return mRefCnt; - } - delete this; +IFACEMETHODIMP_(ULONG) gfxDWriteFontFileStream::Release() { + MOZ_ASSERT(0 != mRefCnt, "dup release"); + uint32_t count = --mRefCnt; + if (count == 0) { + // Avoid locking unless necessary. Verify the refcount hasn't changed + // while locked. Delete within the scope of the lock when zero. + StaticMutexAutoLock lock(sFontFileStreamsMutex); + if (0 != mRefCnt) { + return mRefCnt; } - return count; - } - - // IDWriteFontFileStream methods - virtual HRESULT STDMETHODCALLTYPE - ReadFileFragment(void const** fragmentStart, UINT64 fileOffset, - UINT64 fragmentSize, OUT void** fragmentContext); - - virtual void STDMETHODCALLTYPE ReleaseFileFragment(void* fragmentContext); - - virtual HRESULT STDMETHODCALLTYPE GetFileSize(OUT UINT64* fileSize); - - virtual HRESULT STDMETHODCALLTYPE GetLastWriteTime(OUT UINT64* lastWriteTime); - - size_t SizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const { - return mData.ShallowSizeOfExcludingThis(mallocSizeOf); - } - - size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const { - return mallocSizeOf(this) + SizeOfExcludingThis(mallocSizeOf); + delete this; } - - private: - FallibleTArray<uint8_t> mData; - mozilla::Atomic<uint32_t> mRefCnt; - uint64_t mFontFileKey; -}; + return count; +} gfxDWriteFontFileStream::gfxDWriteFontFileStream(const uint8_t* aData, uint32_t aLength, @@ -98,7 +42,7 @@ gfxDWriteFontFileStream::gfxDWriteFontFileStream(const uint8_t* aData, : mFontFileKey(aFontFileKey) { // If this fails, mData will remain empty. That's OK: GetFileSize() // will then return 0, etc., and the font just won't load. - if (!mData.AppendElements(aData, aLength, mozilla::fallible_t())) { + if (!mData.AppendElements(aData, aLength, fallible_t())) { NS_WARNING("Failed to store data in gfxDWriteFontFileStream"); } } @@ -141,7 +85,7 @@ HRESULT STDMETHODCALLTYPE gfxDWriteFontFileLoader::CreateStreamFromKey( return E_POINTER; } - mozilla::StaticMutexAutoLock lock(sFontFileStreamsMutex); + StaticMutexAutoLock lock(sFontFileStreamsMutex); uint64_t fontFileKey = *static_cast<const uint64_t*>(fontFileReferenceKey); auto found = sFontFileStreams.find(fontFileKey); if (found == sFontFileStreams.end()) { @@ -158,11 +102,11 @@ HRESULT STDMETHODCALLTYPE gfxDWriteFontFileLoader::CreateStreamFromKey( HRESULT gfxDWriteFontFileLoader::CreateCustomFontFile( const uint8_t* aFontData, uint32_t aLength, IDWriteFontFile** aFontFile, - IDWriteFontFileStream** aFontFileStream) { + gfxDWriteFontFileStream** aFontFileStream) { MOZ_ASSERT(aFontFile); MOZ_ASSERT(aFontFileStream); - RefPtr<IDWriteFactory> factory = mozilla::gfx::Factory::GetDWriteFactory(); + RefPtr<IDWriteFactory> factory = gfx::Factory::GetDWriteFactory(); if (!factory) { gfxCriticalError() << "Failed to get DWrite Factory in CreateCustomFontFile."; @@ -191,15 +135,16 @@ gfxDWriteFontFileLoader::CreateCustomFontFile( } size_t gfxDWriteFontFileLoader::SizeOfIncludingThis( - mozilla::MallocSizeOf mallocSizeOf) const { - size_t sizes = mallocSizeOf(this); - + MallocSizeOf mallocSizeOf) const { // We are a singleton type that is effective owner of sFontFileStreams. MOZ_ASSERT(this == mInstance); - for (const auto& entry : sFontFileStreams) { - gfxDWriteFontFileStream* fileStream = entry.second; - sizes += fileStream->SizeOfIncludingThis(mallocSizeOf); - } + + size_t sizes = mallocSizeOf(this); + + // We don't have memory-reporting methods for a std::unordered_map, so just + // take the size of the actual elements stored for now. + sizes += sFontFileStreams.size() * + (sizeof(uint64_t) + sizeof(gfxDWriteFontFileStream*)); return sizes; } diff --git a/gfx/thebes/gfxDWriteCommon.h b/gfx/thebes/gfxDWriteCommon.h @@ -11,7 +11,6 @@ #include "mozilla/FontPropertyTypes.h" #include "nscore.h" #include "nsCOMPtr.h" -#include "cairo-features.h" #include "gfxFontConstants.h" #include "nsTArray.h" #include "gfxWindowsPlatform.h" @@ -94,6 +93,65 @@ static inline mozilla::FontStretch FontStretchFromDWriteStretch( } } +class gfxDWriteFontFileStream final : public IDWriteFontFileStream { + public: + /** + * Used by the FontFileLoader to create a new font stream, + * this font stream is created from data in memory. The memory + * passed may be released after object creation, it will be + * copied internally. + * + * @param aData Font data + */ + gfxDWriteFontFileStream(const uint8_t* aData, uint32_t aLength, + uint64_t aFontFileKey); + ~gfxDWriteFontFileStream(); + + // IUnknown interface + IFACEMETHOD(QueryInterface)(IID const& iid, OUT void** ppObject) { + if (iid == __uuidof(IDWriteFontFileStream)) { + *ppObject = static_cast<IDWriteFontFileStream*>(this); + return S_OK; + } else if (iid == __uuidof(IUnknown)) { + *ppObject = static_cast<IUnknown*>(this); + return S_OK; + } else { + return E_NOINTERFACE; + } + } + + IFACEMETHOD_(ULONG, AddRef)() { + MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt"); + return ++mRefCnt; + } + + IFACEMETHOD_(ULONG, Release)(); + + // IDWriteFontFileStream methods + virtual HRESULT STDMETHODCALLTYPE + ReadFileFragment(void const** fragmentStart, UINT64 fileOffset, + UINT64 fragmentSize, OUT void** fragmentContext); + + virtual void STDMETHODCALLTYPE ReleaseFileFragment(void* fragmentContext); + + virtual HRESULT STDMETHODCALLTYPE GetFileSize(OUT UINT64* fileSize); + + virtual HRESULT STDMETHODCALLTYPE GetLastWriteTime(OUT UINT64* lastWriteTime); + + size_t SizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const { + return mData.ShallowSizeOfExcludingThis(mallocSizeOf); + } + + size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const { + return mallocSizeOf(this) + SizeOfExcludingThis(mallocSizeOf); + } + + private: + FallibleTArray<uint8_t> mData; + mozilla::Atomic<uint32_t> mRefCnt; + uint64_t mFontFileKey; +}; + class gfxDWriteFontFileLoader : public IDWriteFontFileLoader { public: gfxDWriteFontFileLoader() {} @@ -147,10 +205,9 @@ class gfxDWriteFontFileLoader : public IDWriteFontFileLoader { * @param aFontFileStream out param for the corresponding stream * @return HRESULT of internal calls */ - static HRESULT CreateCustomFontFile(const uint8_t* aFontData, - uint32_t aLength, - IDWriteFontFile** aFontFile, - IDWriteFontFileStream** aFontFileStream); + static HRESULT CreateCustomFontFile( + const uint8_t* aFontData, uint32_t aLength, IDWriteFontFile** aFontFile, + gfxDWriteFontFileStream** aFontFileStream); size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const; diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp @@ -9,6 +9,7 @@ #include "gfxDWriteFontList.h" #include "gfxDWriteFonts.h" +#include "gfxDWriteCommon.h" #include "nsUnicharUtils.h" #include "nsPresContext.h" #include "nsServiceManagerUtils.h" @@ -907,6 +908,15 @@ void gfxDWriteFontEntry::AddSizeOfIncludingThis(MallocSizeOf aMallocSizeOf, AddSizeOfExcludingThis(aMallocSizeOf, aSizes); } +size_t gfxDWriteFontEntry::ComputedSizeOfExcludingThis( + mozilla::MallocSizeOf aMallocSizeOf) { + size_t result = gfxFontEntry::ComputedSizeOfExcludingThis(aMallocSizeOf); + if (mFontFileStream) { + result += mFontFileStream->SizeOfExcludingThis(aMallocSizeOf); + } + return result; +} + //////////////////////////////////////////////////////////////////////////////// // gfxDWriteFontList @@ -973,7 +983,7 @@ gfxFontEntry* gfxDWriteFontList::MakePlatformFont( const nsACString& aFontName, WeightRange aWeightForEntry, StretchRange aStretchForEntry, SlantStyleRange aStyleForEntry, const uint8_t* aFontData, uint32_t aLength) { - RefPtr<IDWriteFontFileStream> fontFileStream; + RefPtr<gfxDWriteFontFileStream> fontFileStream; RefPtr<IDWriteFontFile> fontFile; HRESULT hr = gfxDWriteFontFileLoader::CreateCustomFontFile( aFontData, aLength, getter_AddRefs(fontFile), diff --git a/gfx/thebes/gfxDWriteFontList.h b/gfx/thebes/gfxDWriteFontList.h @@ -158,7 +158,7 @@ class gfxDWriteFontEntry final : public gfxFontEntry { * \param aStyle italic or oblique of font */ gfxDWriteFontEntry(const nsACString& aFaceName, IDWriteFontFile* aFontFile, - IDWriteFontFileStream* aFontFileStream, + gfxDWriteFontFileStream* aFontFileStream, WeightRange aWeight, StretchRange aStretch, SlantStyleRange aStyle) : gfxFontEntry(aFaceName), @@ -199,6 +199,9 @@ class gfxDWriteFontEntry final : public gfxFontEntry { void AddSizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf, FontListSizes* aSizes) const override; + size_t ComputedSizeOfExcludingThis( + mozilla::MallocSizeOf aMallocSizeOf) override; + protected: friend class gfxDWriteFont; friend class gfxDWriteFontList; @@ -225,7 +228,7 @@ class gfxDWriteFontEntry final : public gfxFontEntry { // For custom fonts, we hold a reference to the IDWriteFontFileStream for // for the IDWriteFontFile, so that the data is available. - RefPtr<IDWriteFontFileStream> mFontFileStream; + RefPtr<gfxDWriteFontFileStream> mFontFileStream; // font face corresponding to the mFont/mFontFile *without* any DWrite // style simulations applied diff --git a/gfx/thebes/gfxDWriteFonts.h b/gfx/thebes/gfxDWriteFonts.h @@ -11,6 +11,7 @@ #include "mozilla/UniquePtr.h" #include <dwrite_1.h> +#include "gfxDWriteCommon.h" #include "gfxFont.h" #include "gfxUserFontSet.h" #include "nsTHashMap.h" diff --git a/gfx/thebes/gfxFT2FontBase.cpp b/gfx/thebes/gfxFT2FontBase.cpp @@ -133,6 +133,19 @@ uint32_t gfxFT2FontEntryBase::GetGlyph(uint32_t aCharCode, return slot.mGlyphIndex; } +size_t gfxFT2FontEntryBase::ComputedSizeOfExcludingThis( + MallocSizeOf aMallocSizeOf) { + size_t result = gfxFontEntry::ComputedSizeOfExcludingThis(aMallocSizeOf); + + if (const auto* data = GetUserFontData()) { + if (data->FontData()) { + result += aMallocSizeOf(data->FontData()); + } + } + + return result; +} + // aScale is intended for a 16.16 x/y_scale of an FT_Size_Metrics static inline FT_Long ScaleRoundDesignUnits(FT_Short aDesignMetric, FT_Fixed aScale) { diff --git a/gfx/thebes/gfxFT2FontBase.h b/gfx/thebes/gfxFT2FontBase.h @@ -16,6 +16,12 @@ class gfxFT2FontBase; +namespace mozilla { +namespace gfx { +class FTUserFontData; +} +} // namespace mozilla + class gfxFT2FontEntryBase : public gfxFontEntry { public: explicit gfxFT2FontEntryBase(const nsACString& aName) : gfxFontEntry(aName) {} @@ -26,6 +32,11 @@ class gfxFT2FontEntryBase : public gfxFontEntry { static nsresult CopyFaceTable(mozilla::gfx::SharedFTFace*, uint32_t aTableTag, nsTArray<uint8_t>&); + virtual mozilla::gfx::FTUserFontData* GetUserFontData() = 0; + + size_t ComputedSizeOfExcludingThis( + mozilla::MallocSizeOf aMallocSizeOf) override; + private: enum { kNumCmapCacheSlots = 256 }; diff --git a/gfx/thebes/gfxFT2FontList.h b/gfx/thebes/gfxFT2FontList.h @@ -80,7 +80,7 @@ class FT2FontEntry final : public gfxFT2FontEntryBase { void CheckForBrokenFont(const nsACString& aFamilyKey); already_AddRefed<mozilla::gfx::SharedFTFace> GetFTFace(bool aCommit = false); - FTUserFontData* GetUserFontData(); + FTUserFontData* GetUserFontData() override; FT_MM_Var* GetMMVar() override; diff --git a/gfx/thebes/gfxFcPlatformFontList.h b/gfx/thebes/gfxFcPlatformFontList.h @@ -95,7 +95,7 @@ class gfxFontconfigFontEntry final : public gfxFT2FontEntryBase { bool TestCharacterMap(uint32_t aCh) override; mozilla::gfx::SharedFTFace* GetFTFace(); - FTUserFontData* GetUserFontData(); + FTUserFontData* GetUserFontData() override; FT_MM_Var* GetMMVar() override; diff --git a/gfx/thebes/gfxFontEntry.cpp b/gfx/thebes/gfxFontEntry.cpp @@ -1475,25 +1475,17 @@ void gfxFontEntry::AddSizeOfIncludingThis(MallocSizeOf aMallocSizeOf, // user font cache. (Fonts that are part of the platform font list accumulate // their sizes to the font list's reporter using the AddSizeOf... methods // above.) -size_t gfxFontEntry::ComputedSizeOfExcludingThis( - MallocSizeOf aMallocSizeOf) const { +size_t gfxFontEntry::ComputedSizeOfExcludingThis(MallocSizeOf aMallocSizeOf) { FontListSizes s = {0}; AddSizeOfExcludingThis(aMallocSizeOf, &s); // When reporting memory used for the main platform font list, // where we're typically summing the totals for a few hundred font faces, // we report the fields of FontListSizes separately. - // But for downloaded user fonts, the actual resource data (added below) - // will dominate, and the minor overhead of these pieces isn't worth - // splitting out for an individual font. - size_t result = s.mFontListSize + s.mFontTableCacheSize + s.mCharMapsSize; - - if (mIsDataUserFont) { - MOZ_ASSERT(mComputedSizeOfUserFont > 0, "user font with no data?"); - result += mComputedSizeOfUserFont; - } - - return result; + // But for downloaded user fonts, the actual resource data (added by the + // subclass) will dominate, and the minor overhead of these pieces isn't + // worth splitting out for an individual font. + return s.mFontListSize + s.mFontTableCacheSize + s.mCharMapsSize; } ////////////////////////////////////////////////////////////////////////////// diff --git a/gfx/thebes/gfxFontEntry.h b/gfx/thebes/gfxFontEntry.h @@ -493,7 +493,8 @@ class gfxFontEntry { // Used for reporting on individual font entries in the user font cache, // which are not present in the platform font list. - size_t ComputedSizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + virtual size_t ComputedSizeOfExcludingThis( + mozilla::MallocSizeOf aMallocSizeOf); // Used when checking for complex script support, to mask off cmap ranges struct ScriptRange { @@ -793,12 +794,6 @@ class gfxFontEntry { friend class gfxFontEntryCallbacks; - // For memory reporting: size of user-font data belonging to this entry. - // We record this in the font entry because the actual data block may be - // handed over to platform APIs, so that it would become difficult (and - // platform-specific) to measure it directly at report-gathering time. - uint32_t mComputedSizeOfUserFont = 0; - // Font's unitsPerEm from the 'head' table, if available (will be set to // kInvalidUPEM for non-sfnt font formats) uint16_t mUnitsPerEm = 0; diff --git a/gfx/thebes/gfxUserFontSet.cpp b/gfx/thebes/gfxUserFontSet.cpp @@ -655,8 +655,6 @@ void gfxUserFontEntry::SetLoadState(UserFontLoadState aLoadState) { mUserFontLoadState = aLoadState; } -MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(UserFontMallocSizeOfOnAlloc) - bool gfxUserFontEntry::LoadPlatformFontSync(uint32_t aSrcIndex, const uint8_t* aFontData, uint32_t aLength) { @@ -745,7 +743,6 @@ bool gfxUserFontEntry::LoadPlatformFont(uint32_t aSrcIndex, gfxFontEntry* fe = nullptr; uint32_t fontCompressionRatio = 0; - size_t computedSize = 0; if (aSanitizedFontData) { if (aSanitizedLength) { @@ -767,14 +764,6 @@ bool gfxUserFontEntry::LoadPlatformFont(uint32_t aSrcIndex, gfxFontUtils::GetFullNameFromSFNT(aSanitizedFontData, aSanitizedLength, originalFullName); - // Record size for memory reporting purposes. We measure this now - // because by the time we potentially want to collect reports, this - // data block may have been handed off to opaque OS font APIs that - // don't allow us to retrieve or measure it directly. - // The *OnAlloc function will also tell DMD about this block, as the - // OS font code may hold on to it for an extended period. - computedSize = UserFontMallocSizeOfOnAlloc(aSanitizedFontData); - // Here ownership of aSanitizedFontData is passed to the platform, // which will delete it when no longer required fe = gfxPlatform::GetPlatform()->MakePlatformFont( @@ -786,8 +775,6 @@ bool gfxUserFontEntry::LoadPlatformFont(uint32_t aSrcIndex, } if (fe) { - fe->mComputedSizeOfUserFont = computedSize; - // Save a copy of the metadata block (if present) for InspectorUtils // to use if required. Ownership of the metadata block will be passed // to the gfxUserFontData record below.