Slight tweak per biesi's comments. Bug 343850

This commit is contained in:
bzbarsky%mit.edu 2006-07-19 13:27:53 +00:00
parent 090f21ab6c
commit 535042aed4

View File

@ -752,11 +752,12 @@ nsJSChannel::OnStopRequest(nsIRequest* aRequest,
nsISupports* aContext,
nsresult aStatus)
{
NS_ENSURE_TRUE(aRequest == mStreamChannel, NS_ERROR_UNEXPECTED);
// Make sure to drop our ref to mListener
nsCOMPtr<nsIStreamListener> listener;
listener.swap(mListener);
NS_ENSURE_TRUE(aRequest == mStreamChannel, NS_ERROR_UNEXPECTED);
return listener->OnStopRequest(this, aContext, aStatus);
}