void HttpBaseChannel::DoNotifyListener() { // Make sure mIsPending is set to false. At this moment we are done from // the point of view of our consumer and we have to report our self // as not-pending. if (mListener) { mListener->OnStartRequest(this, mListenerContext); mIsPending = false; mListener->OnStopRequest(this, mListenerContext, mStatus); } else { mIsPending = false; } // We have to make sure to drop the references to listeners and callbacks // no longer needed ReleaseListeners(); DoNotifyListenerCleanup(); }
void HttpBaseChannel::DoNotifyListener() { // Make sure mIsPending is set to false. At this moment we are done from // the point of view of our consumer and we have to report our self // as not-pending. if (mListener) { mListener->OnStartRequest(this, mListenerContext); mIsPending = false; mListener->OnStopRequest(this, mListenerContext, mStatus); mListener = 0; mListenerContext = 0; } else { mIsPending = false; } // We have to make sure to drop the reference to the callbacks too mCallbacks = nsnull; mProgressSink = nsnull; DoNotifyListenerCleanup(); }