Bug 1333974, part 2 - Use new API for images. r=tnikkel
authorAndrew McCreight <continuation@gmail.com>
Tue, 31 Jan 2017 11:34:01 -0800
changeset 332284 4a3433f44ccf676a20c3083ee5fef686951d120c
parent 332283 ecb2dfe369e815b0f6c7522c7b68eabe653c98bc
child 332285 6dfd1abb7e943267ef499a17037205d109c19122
push id86501
push userkwierso@gmail.com
push dateFri, 03 Feb 2017 00:45:15 +0000
treeherdermozilla-inbound@f3793c0f52fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1333974
milestone54.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 1333974, part 2 - Use new API for images. r=tnikkel MozReview-Commit-ID: CmjVpXAFmjx
image/AnimationSurfaceProvider.cpp
image/DecodedSurfaceProvider.cpp
image/Decoder.cpp
--- a/image/AnimationSurfaceProvider.cpp
+++ b/image/AnimationSurfaceProvider.cpp
@@ -45,17 +45,17 @@ AnimationSurfaceProvider::DropImageRefer
 
   // RasterImage objects need to be destroyed on the main thread. We also need
   // to destroy them asynchronously, because if our surface cache entry is
   // destroyed and we were the only thing keeping |mImage| alive, RasterImage's
   // destructor may call into the surface cache while whatever code caused us to
   // get evicted is holding the surface cache lock, causing deadlock.
   RefPtr<RasterImage> image = mImage;
   mImage = nullptr;
-  NS_ReleaseOnMainThread(image.forget(), /* aAlwaysProxy = */ true);
+  NS_ReleaseOnMainThreadSystemGroup(image.forget(), /* aAlwaysProxy = */ true);
 }
 
 DrawableFrameRef
 AnimationSurfaceProvider::DrawableRef(size_t aFrame)
 {
   MutexAutoLock lock(mFramesMutex);
 
   if (Availability().IsPlaceholder()) {
--- a/image/DecodedSurfaceProvider.cpp
+++ b/image/DecodedSurfaceProvider.cpp
@@ -44,17 +44,17 @@ DecodedSurfaceProvider::DropImageReferen
 
   // RasterImage objects need to be destroyed on the main thread. We also need
   // to destroy them asynchronously, because if our surface cache entry is
   // destroyed and we were the only thing keeping |mImage| alive, RasterImage's
   // destructor may call into the surface cache while whatever code caused us to
   // get evicted is holding the surface cache lock, causing deadlock.
   RefPtr<RasterImage> image = mImage;
   mImage = nullptr;
-  NS_ReleaseOnMainThread(image.forget(), /* aAlwaysProxy = */ true);
+  NS_ReleaseOnMainThreadSystemGroup(image.forget(), /* aAlwaysProxy = */ true);
 }
 
 DrawableFrameRef
 DecodedSurfaceProvider::DrawableRef(size_t aFrame)
 {
   MOZ_ASSERT(aFrame == 0,
              "Requesting an animation frame from a DecodedSurfaceProvider?");
 
--- a/image/Decoder.cpp
+++ b/image/Decoder.cpp
@@ -72,17 +72,17 @@ Decoder::~Decoder()
              "Destroying Decoder without taking all its progress changes");
   MOZ_ASSERT(mInvalidRect.IsEmpty() || !mImage,
              "Destroying Decoder without taking all its invalidations");
   mInitialized = false;
 
   if (mImage && !NS_IsMainThread()) {
     // Dispatch mImage to main thread to prevent it from being destructed by the
     // decode thread.
-    NS_ReleaseOnMainThread(mImage.forget());
+    NS_ReleaseOnMainThreadSystemGroup(mImage.forget());
   }
 }
 
 /*
  * Common implementation of the decoder interface.
  */
 
 nsresult