Backed out changeset 2ac62de7365d (bug 1271002) for crash in GTest: [@ mozilla::image::RasterImage::UpdateImageContainer]. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sat, 14 May 2016 00:08:18 +0200
changeset 297429 2a218727e6e69350525bf4725f014d170c377821
parent 297428 0569f59c7ce73929e405e1ea6c14fc343e0aee25
child 297430 d035a4e34c7bbc6b504e578050e9abe9c4727589
push id30257
push userphilringnalda@gmail.com
push dateSat, 14 May 2016 20:03:55 +0000
treeherdermozilla-central@1665c708ebab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1271002
milestone49.0a1
backs out2ac62de7365d1557e3f2f53900f587cf4bc68cd9
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
Backed out changeset 2ac62de7365d (bug 1271002) for crash in GTest: [@ mozilla::image::RasterImage::UpdateImageContainer]. r=backout
image/DecodePool.cpp
image/DecodePool.h
image/Decoder.cpp
--- a/image/DecodePool.cpp
+++ b/image/DecodePool.cpp
@@ -464,17 +464,16 @@ DecodePool::Decode(Decoder* aDecoder)
     NotifyDecodeComplete(aDecoder);
   }
 }
 
 void
 DecodePool::NotifyProgress(Decoder* aDecoder)
 {
   MOZ_ASSERT(aDecoder);
-  MOZ_ASSERT(aDecoder->HasProgress() && !aDecoder->IsMetadataDecode());
 
   if (!NS_IsMainThread() ||
       (aDecoder->GetDecoderFlags() & DecoderFlags::ASYNC_NOTIFY)) {
     NotifyProgressWorker::Dispatch(aDecoder->GetImage(),
                                    aDecoder->TakeProgress(),
                                    aDecoder->TakeInvalidRect(),
                                    aDecoder->GetSurfaceFlags());
     return;
--- a/image/DecodePool.h
+++ b/image/DecodePool.h
@@ -74,29 +74,25 @@ public:
    * Returns an event target interface to the DecodePool's I/O thread. Callers
    * who want to deliver data to workers on the DecodePool can use this event
    * target.
    *
    * @return An nsIEventTarget interface to the thread pool's I/O thread.
    */
   already_AddRefed<nsIEventTarget> GetIOEventTarget();
 
-  /**
-   * Notify about progress on aDecoder.
-   */
-  void NotifyProgress(Decoder* aDecoder);
-
 private:
   friend class DecodePoolWorker;
 
   DecodePool();
   virtual ~DecodePool();
 
   void Decode(Decoder* aDecoder);
   void NotifyDecodeComplete(Decoder* aDecoder);
+  void NotifyProgress(Decoder* aDecoder);
 
   static StaticRefPtr<DecodePool> sSingleton;
   static uint32_t sNumCores;
 
   RefPtr<DecodePoolImpl>    mImpl;
 
   // mMutex protects mThreads and mIOThread.
   Mutex                         mMutex;
--- a/image/Decoder.cpp
+++ b/image/Decoder.cpp
@@ -444,22 +444,16 @@ Decoder::PostFrameStop(Opacity aFrameOpa
   mProgress |= FLAG_FRAME_COMPLETE;
 
   // If we're not sending partial invalidations, then we send an invalidation
   // here when the first frame is complete.
   if (!ShouldSendPartialInvalidations() && mFrameCount == 1) {
     mInvalidRect.UnionRect(mInvalidRect,
                            gfx::IntRect(gfx::IntPoint(0, 0), GetSize()));
   }
-
-  // If we are going to keep decoding we should notify now about the first frame being done.
-  if (mFrameCount == 1 && HasAnimation()) {
-    MOZ_ASSERT(HasProgress());
-    DecodePool::Singleton()->NotifyProgress(this);
-  }
 }
 
 void
 Decoder::PostInvalidation(const nsIntRect& aRect,
                           const Maybe<nsIntRect>& aRectAtTargetSize
                             /* = Nothing() */)
 {
   // We should be mid-frame