LOG_SCOPE(gImgLog, "imgRequest::OnStopDecode");
LOG_FUNC(gImgLog, "imgRequestProxy::OnStopDecode");
NS_IMETHODIMP imgRequest::OnStopDecode(imgIRequest *aRequest,                                       nsresult aStatus,                                       const PRUnichar *aStatusArg){  LOG_SCOPE(gImgLog, "imgRequest::OnStopDecode");  NS_ASSERTION(!(mState & onStopDecode), "OnStopDecode called multiple times.");  mState |= onStopDecode;  if (NS_FAILED(aStatus) && !(mImageStatus & imgIRequest::STATUS_LOAD_PARTIAL)) {    mImageStatus |= imgIRequest::STATUS_ERROR;  }  PRInt32 count = mObservers.Count();  for (PRInt32 i = 0; i < count; i++) {    imgRequestProxy *proxy = NS_STATIC_CAST(imgRequestProxy*, mObservers[i]);    if (proxy) proxy->OnStopDecode(GetResultFromImageStatus(mImageStatus), aStatusArg);    // If this assertion fires, it means that imgRequest notifications could    // be dropped!    NS_ASSERTION(count == mObservers.Count(),                  "The observer list changed while being iterated over!");  }  return NS_OK;}