fixes bug 143821 "Trunk M1RC2 crashes with bad connection

[@ nsHttpHandler::ReclaimConnection]" r=kaie sr=jag
This commit is contained in:
darin%netscape.com 2002-05-15 03:07:14 +00:00
parent 426ca28204
commit bf39c1069e

View File

@ -64,6 +64,10 @@ nsHttpConnection::nsHttpConnection()
LOG(("Creating nsHttpConnection @%x\n", this));
NS_INIT_ISUPPORTS();
// grab a reference to the handler to ensure that it doesn't go away.
nsHttpHandler *handler = nsHttpHandler::get();
NS_ADDREF(handler);
}
nsHttpConnection::~nsHttpConnection()
@ -77,6 +81,10 @@ nsHttpConnection::~nsHttpConnection()
PR_DestroyLock(mLock);
mLock = nsnull;
}
// release our reference to the handler
nsHttpHandler *handler = nsHttpHandler::get();
NS_RELEASE(handler);
}
nsresult