mIsSubmitting = PR_FALSE; mSubmittingRequest = nsnull; aWebProgress->RemoveProgressListener(this);
ForgetCurrentSubmission();
nsHTMLFormElement::OnStateChange(nsIWebProgress* aWebProgress,                                 nsIRequest* aRequest,                                 PRUint32 aStateFlags,                                 PRUint32 aStatus){  // If STATE_STOP is never fired for any reason (redirect?  Failed state  // change?) the form element will leak.  It will be kept around by the  // nsIWebProgressListener (assuming it keeps a strong pointer).  We will  // consequently leak the request.  if (aRequest == mSubmittingRequest &&      aStateFlags & nsIWebProgressListener::STATE_STOP) {    mIsSubmitting = PR_FALSE;    mSubmittingRequest = nsnull;    aWebProgress->RemoveProgressListener(this);  }  return NS_OK;}