if (NS_SUCCEEDED(status)) event.message = NS_IMAGE_LOAD; else event.message = NS_IMAGE_ERROR;
nsHTMLImageElement::OnStopDecode(imgIRequest *request, nsISupports *cx,                                 nsresult status, const PRUnichar *statusArg){  nsCOMPtr<nsIPresContext> pc(do_QueryInterface(cx));  NS_ASSERTION(pc, "not a prescontext!");  // We set mRequest = nsnull to indicate that we're complete.  mRequest = nsnull;  // Fire the onload event.  nsEventStatus estatus = nsEventStatus_eIgnore;  nsEvent event;  event.eventStructType = NS_EVENT;  if (NS_SUCCEEDED(status))    event.message = NS_IMAGE_LOAD;  else    event.message = NS_IMAGE_ERROR;  HandleDOMEvent(pc, &event, nsnull, NS_EVENT_FLAG_INIT, &estatus);  return NS_OK;}