Bug 1347815 - part3: label RuleProcessorCache::mExpirationTracker. draft
authorJeremy Chen <jeremychen@mozilla.com>
Sun, 09 Apr 2017 16:53:57 +0800
changeset 559239 a2b844ae3f093ecd198512bd083e75855b9cf704
parent 559238 37a58ea16d49df67e36325a71a7c6f60244a034e
child 623334 883a21ff84d537d67b195566dfc0b781f2ed71c0
push id53025
push userjichen@mozilla.com
push dateSun, 09 Apr 2017 08:54:13 +0000
bugs1347815
milestone55.0a1
Bug 1347815 - part3: label RuleProcessorCache::mExpirationTracker. RuleProcessorCache::mExpirationTracker.NotifyExpired() will be invoked by nsExpirationTracker::TimerCallback() from an unlabeled runnable. Since RuleProcessorCache is a browser-wide cache, we provide a SystemGroup EventTarget for the invocation of this callback. MozReview-Commit-ID: KQATsLu6bdc
layout/style/RuleProcessorCache.h
--- a/layout/style/RuleProcessorCache.h
+++ b/layout/style/RuleProcessorCache.h
@@ -67,17 +67,18 @@ public:
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf);
 
 private:
   class ExpirationTracker : public nsExpirationTracker<nsCSSRuleProcessor,3>
   {
   public:
     explicit ExpirationTracker(RuleProcessorCache* aCache)
       : nsExpirationTracker<nsCSSRuleProcessor,3>(
-          10000, "RuleProcessorCache::ExpirationTracker")
+          10000, "RuleProcessorCache::ExpirationTracker",
+          SystemGroup::EventTargetFor(TaskCategory::Other))
       , mCache(aCache) {}
 
     void RemoveObjectIfTracked(nsCSSRuleProcessor* aRuleProcessor);
 
     virtual void NotifyExpired(nsCSSRuleProcessor* aRuleProcessor) override {
       mCache->RemoveRuleProcessor(aRuleProcessor);
     }