Bug 690425 - Fix shutdown crash in HttpChannelChild. r=jdm

This commit is contained in:
Justin Lebar 2012-02-08 17:46:50 -05:00
Родитель c51b2c2259
Коммит 611c2f2c84
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -92,9 +92,9 @@ NS_IMETHODIMP_(nsrefcnt) HttpChannelChild::Release()
// Normally we Send_delete in OnStopRequest, but when we need to retain the // Normally we Send_delete in OnStopRequest, but when we need to retain the
// remote channel for security info IPDL itself holds 1 reference, so we // remote channel for security info IPDL itself holds 1 reference, so we
// Send_delete when refCnt==1. // Send_delete when refCnt==1. But if !mIPCOpen, then there's nobody to send
if (mKeptAlive && mRefCnt == 1) { // to, so we fall through.
NS_ASSERTION(mIPCOpen, "mIPCOpen false!"); if (mKeptAlive && mRefCnt == 1 && mIPCOpen) {
mKeptAlive = false; mKeptAlive = false;
// Send_delete calls NeckoChild::DeallocPHttpChannel, which will release // Send_delete calls NeckoChild::DeallocPHttpChannel, which will release
// again to refcount==0 // again to refcount==0