Bug 862909 (Part 3) - Assert that we own the decoding mutex in CurrentStatusTracker. r=tn
authorSeth Fowler <seth@mozilla.com>
Tue, 17 Dec 2013 14:04:32 -0800
changeset 171152 4ed374e9a2902a17361b4d0ec4b32f2c74046eb9
parent 171151 8be832270608590a1d486dd8a33468aeec89fdf3
child 171153 88f21d4b4c78682672ca349cba931898a8c89ccd
push idunknown
push userunknown
push dateunknown
reviewerstn
bugs862909
milestone29.0a1
Bug 862909 (Part 3) - Assert that we own the decoding mutex in CurrentStatusTracker. r=tn
image/src/RasterImage.h
--- a/image/src/RasterImage.h
+++ b/image/src/RasterImage.h
@@ -312,16 +312,17 @@ public:
     eShutdownIntent_AllCount    = 3
   };
 
   // Decode strategy
 
 private:
   already_AddRefed<imgStatusTracker> CurrentStatusTracker()
   {
+    mDecodingMonitor.AssertCurrentThreadIn();
     nsRefPtr<imgStatusTracker> statusTracker;
     statusTracker = mDecodeRequest ? mDecodeRequest->mStatusTracker
                                    : mStatusTracker;
     MOZ_ASSERT(statusTracker);
     return statusTracker.forget();
   }
 
   nsresult OnImageDataCompleteCore(nsIRequest* aRequest, nsISupports*, nsresult aStatus);