diff --git a/image/src/imgStatusTracker.cpp b/image/src/imgStatusTracker.cpp index 062841069260..938a023b77b2 100644 --- a/image/src/imgStatusTracker.cpp +++ b/image/src/imgStatusTracker.cpp @@ -48,9 +48,6 @@ public: } if (!mTracker->IsMultipart()) { - MOZ_ASSERT(!mTracker->mBlockingOnload); - mTracker->mBlockingOnload = true; - mTracker->RecordBlockOnload(); nsTObserverArray::ForwardIterator iter(mTracker->mConsumers); @@ -198,22 +195,19 @@ private: imgStatusTracker::imgStatusTracker(Image* aImage) : mImage(aImage), + mTrackerObserver(new imgStatusTrackerObserver(this)), mState(0), mImageStatus(imgIRequest::STATUS_NONE), mIsMultipart(false), - mHadLastPart(false), - mBlockingOnload(false) -{ - mTrackerObserver = new imgStatusTrackerObserver(this); -} + mHadLastPart(false) +{} imgStatusTracker::imgStatusTracker(const imgStatusTracker& aOther) : mImage(aOther.mImage), mState(aOther.mState), mImageStatus(aOther.mImageStatus), mIsMultipart(aOther.mIsMultipart), - mHadLastPart(aOther.mHadLastPart), - mBlockingOnload(aOther.mBlockingOnload) + mHadLastPart(aOther.mHadLastPart) // Note: we explicitly don't copy mRequestRunnable, because it won't be // nulled out when the mRequestRunnable's Run function eventually gets // called. @@ -763,12 +757,10 @@ imgStatusTracker::SendUnblockOnload(imgRequestProxy* aProxy) void imgStatusTracker::MaybeUnblockOnload() { - if (!mBlockingOnload) { + if (!(mState & stateBlockingOnload)) { return; } - mBlockingOnload = false; - RecordUnblockOnload(); nsTObserverArray::ForwardIterator iter(mConsumers); diff --git a/image/src/imgStatusTracker.h b/image/src/imgStatusTracker.h index 9610cc2494f5..447d44c1e48c 100644 --- a/image/src/imgStatusTracker.h +++ b/image/src/imgStatusTracker.h @@ -200,7 +200,6 @@ private: uint32_t mImageStatus; bool mIsMultipart : 1; bool mHadLastPart : 1; - bool mBlockingOnload : 1; }; #endif