author | Carsten "Tomcat" Book <cbook@mozilla.com> |
Wed, 12 Jul 2017 12:41:37 +0200 | |
changeset 417172 | e4a33d2cfd5b50ff46bb82c2538bdec38094757f |
parent 417171 | ea314f31ac514b77a46eacb58a029caa490e4d73 |
child 417173 | 349f2dfda8a36387e4ec57f9482a88ce296eacc5 |
push id | 7566 |
push user | mtabara@mozilla.com |
push date | Wed, 02 Aug 2017 08:25:16 +0000 |
treeherder | mozilla-beta@86913f512c3c [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1376964 |
milestone | 56.0a1 |
backs out | 0cd32b60dabe168246a1379ad78545a9eb63842e |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
gfx/thebes/gfxUserFontSet.cpp | file | annotate | diff | comparison | revisions | |
gfx/thebes/gfxUserFontSet.h | file | annotate | diff | comparison | revisions |
--- a/gfx/thebes/gfxUserFontSet.cpp +++ b/gfx/thebes/gfxUserFontSet.cpp @@ -1094,20 +1094,17 @@ gfxUserFontSet::GetFamily(const nsAStrin // for a downloaded font will be kept alive by its corresponding gfxFont // instance(s) until they are deleted, and *that* happens using an expiration // tracker (gfxFontCache). The result is that the downloaded font instances // recorded here will persist between pages and can get reused (provided the // source URI and principal match, of course). /////////////////////////////////////////////////////////////////////////////// nsTHashtable<gfxUserFontSet::UserFontCache::Entry>* -gfxUserFontSet::UserFontCache::sUserFonts = nullptr; - -uint32_t -gfxUserFontSet::UserFontCache::sGeneration = 0; + gfxUserFontSet::UserFontCache::sUserFonts = nullptr; NS_IMPL_ISUPPORTS(gfxUserFontSet::UserFontCache::Flusher, nsIObserver) NS_IMETHODIMP gfxUserFontSet::UserFontCache::Flusher::Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData) { @@ -1231,18 +1228,16 @@ gfxUserFontSet::UserFontCache::CacheFont if (IgnorePrincipal(data->mURI)) { principal = nullptr; } else { principal = data->mPrincipal; } sUserFonts->PutEntry(Key(data->mURI, principal, aFontEntry, data->mPrivate)); - ++sGeneration; - #ifdef DEBUG_USERFONT_CACHE printf("userfontcache added fontentry: %p\n", aFontEntry); Dump(); #endif } void gfxUserFontSet::UserFontCache::ForgetFont(gfxFontEntry* aFontEntry)
--- a/gfx/thebes/gfxUserFontSet.h +++ b/gfx/thebes/gfxUserFontSet.h @@ -296,20 +296,16 @@ public: // The aPrivate flag is set for requests coming from private windows, // so we can avoid leaking fonts cached in private windows mode out to // normal windows. static gfxFontEntry* GetFont(nsIURI* aSrcURI, nsIPrincipal* aPrincipal, gfxUserFontEntry* aUserFontEntry, bool aPrivate); - // Generation number that is incremented whenever an entry is added to - // the cache. (Removals don't increment it.) - static uint32_t Generation() { return sGeneration; } - // Clear everything so that we don't leak URIs and Principals. static void Shutdown(); // Memory-reporting support. class MemoryReporter final : public nsIMemoryReporter { private: ~MemoryReporter() { } @@ -427,18 +423,16 @@ public: // (by calling ForgetFont()). gfxFontEntry* MOZ_NON_OWNING_REF mFontEntry; // Whether this font was loaded from a private window. bool mPrivate; }; static nsTHashtable<Entry>* sUserFonts; - - static uint32_t sGeneration; }; void SetLocalRulesUsed() { mLocalRulesUsed = true; } static mozilla::LogModule* GetUserFontsLog();