Make nsIChannel implementations follow the rules that prevent them from leaking due to cycles with their notification callbacks. b=303043 r=biesi sr=darin

git-svn-id: svn://10.0.0.236/trunk@177663 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2005-08-12 22:53:22 +00:00
parent d168cc9570
commit f5fb8ddaff
17 changed files with 81 additions and 2 deletions

View File

@@ -720,6 +720,11 @@ nsJARChannel::OnStopRequest(nsIRequest *req, nsISupports *ctx, nsresult status)
NS_IF_RELEASE(mJarInput);
mIsPending = PR_FALSE;
mDownloader = 0; // this may delete the underlying jar file
// Drop notification callbacks to prevent cycles.
mCallbacks = 0;
mProgressSink = 0;
return NS_OK;
}