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
Родитель 426ca28204
Коммит bf39c1069e
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -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