Bug 1571530 - Don't use nsBaseHashtable in the CSS loader. r=heycam
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 16 Aug 2019 10:56:07 +0000
changeset 488485 1f4c64e73cfc266d25c595a1e943737f577c5e0a
parent 488484 589addc490dc23dfc16eedc50ac90e3dad3a4d1b
child 488486 aec66f88bfd05871e1b03067ba70608f6b320979
push id36444
push userccoroiu@mozilla.com
push dateFri, 16 Aug 2019 16:24:18 +0000
treeherdermozilla-central@8a9e9189cd98 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1571530
milestone70.0a1
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
Bug 1571530 - Don't use nsBaseHashtable in the CSS loader. r=heycam It's a refptr hashtable, really. Differential Revision: https://phabricator.services.mozilla.com/D41027
layout/style/Loader.cpp
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -445,18 +445,17 @@ bool LoaderReusableStyleSheets::FindReus
     }
   }
   return false;
 }
 
 // A struct keeping alive various records of sheets that are loading, deferred,
 // or already loaded (the later one for caching purposes).
 struct Loader::Sheets {
-  nsBaseHashtable<SheetLoadDataHashKey, RefPtr<StyleSheet>, StyleSheet*>
-      mCompleteSheets;
+  nsRefPtrHashtable<SheetLoadDataHashKey, StyleSheet> mCompleteSheets;
   // The SheetLoadData pointers below are weak references.
   nsDataHashtable<SheetLoadDataHashKey, SheetLoadData*> mLoadingDatas;
   nsDataHashtable<SheetLoadDataHashKey, SheetLoadData*> mPendingDatas;
 
   // A cache hit or miss. It is a miss if the `StyleSheet` is null.
   using CacheResult = Tuple<RefPtr<StyleSheet>, SheetState>;
   CacheResult Lookup(SheetLoadDataHashKey&, bool aSyncLoad);
 };