Bug 1574718 - Cycle-collect inline-sheet cache. r=heycam a=lizzard
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 04 Sep 2019 06:27:00 +0000
changeset 554864 fb9e607b73cefeaafb26eb6584461727d860da03
parent 554863 62a886e8b21ea1508f8bb41492d6e034c84afd2d
child 554865 b70d2570cc99542e886bc438208e961fa7f761b2
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam, lizzard
bugs1574718
milestone70.0
Bug 1574718 - Cycle-collect inline-sheet cache. r=heycam a=lizzard This is an oversight from the initial implementation of the cache. Differential Revision: https://phabricator.services.mozilla.com/D43975
layout/style/Loader.cpp
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -2448,17 +2448,22 @@ void Loader::StartDeferredLoads() {
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(Loader)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Loader)
   if (tmp->mSheets) {
     for (auto iter = tmp->mSheets->mCompleteSheets.Iter(); !iter.Done();
          iter.Next()) {
-      NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "Sheet cache nsCSSLoader");
+      NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "OOL sheet cache in Loader");
+      cb.NoteXPCOMChild(iter.UserData());
+    }
+    for (auto iter = tmp->mSheets->mInlineSheets.Iter(); !iter.Done();
+         iter.Next()) {
+      NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "Inline sheet cache in Loader");
       cb.NoteXPCOMChild(iter.UserData());
     }
   }
   nsTObserverArray<nsCOMPtr<nsICSSLoaderObserver>>::ForwardIterator it(
       tmp->mObservers);
   while (it.HasMore()) {
     ImplCycleCollectionTraverse(cb, it.GetNext(),
                                 "mozilla::css::Loader.mObservers");