Bug 1390080 - Label ImageCache.
authorBevis Tseng <btseng@mozilla.com>
Tue, 15 Aug 2017 10:51:54 +0800
changeset 375045 77039c4403730b5ff5ebd98139f44cb6bcf9febe
parent 375044 d3b1275a43bf642908d21650a6f4cfe5972578d2
child 375046 66ef047d44aa6b155f28f9d64286342a0a1e7f1a
push id32344
push usercbook@mozilla.com
push dateWed, 16 Aug 2017 09:23:42 +0000
treeherdermozilla-central@6ebc251bd288 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1390080
milestone57.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 1390080 - Label ImageCache.
dom/canvas/CanvasImageCache.cpp
--- a/dom/canvas/CanvasImageCache.cpp
+++ b/dom/canvas/CanvasImageCache.cpp
@@ -8,16 +8,17 @@
 #include "nsIImageLoadingContent.h"
 #include "nsExpirationTracker.h"
 #include "imgIRequest.h"
 #include "mozilla/dom/Element.h"
 #include "nsTHashtable.h"
 #include "mozilla/dom/HTMLCanvasElement.h"
 #include "nsContentUtils.h"
 #include "mozilla/Preferences.h"
+#include "mozilla/SystemGroup.h"
 #include "mozilla/gfx/2D.h"
 #include "gfx2DGlue.h"
 
 namespace mozilla {
 
 using namespace dom;
 using namespace gfx;
 
@@ -255,17 +256,18 @@ class CanvasImageCacheShutdownObserver f
 {
   ~CanvasImageCacheShutdownObserver() {}
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 };
 
 ImageCache::ImageCache()
-  : nsExpirationTracker<ImageCacheEntryData,4>(GENERATION_MS, "ImageCache")
+  : nsExpirationTracker<ImageCacheEntryData,4>(
+      GENERATION_MS, "ImageCache", SystemGroup::EventTargetFor(TaskCategory::Other))
   , mTotal(0)
 {
   if (!sPrefsInitialized) {
     sPrefsInitialized = true;
     Preferences::AddIntVarCache(&sCanvasImageCacheLimit, "canvas.image.cache.limit", 0);
   }
   mImageCacheObserver = new ImageCacheObserver(this);
   MOZ_RELEASE_ASSERT(mImageCacheObserver, "GFX: Can't alloc ImageCacheObserver");