Address brendan's review comments on bug 391141. r=brendan a=not part of release builds

This commit is contained in:
dbaron@dbaron.org 2007-09-27 09:27:12 -07:00
Родитель 07fa5e0002
Коммит 781ccc59e4
1 изменённых файлов: 6 добавлений и 10 удалений

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

@ -186,19 +186,15 @@ DHWImportHooker::~DHWImportHooker()
mHooking = PR_FALSE;
PatchAllModules();
if(gHooks == this)
gHooks = mNext;
else
for (DHWImportHooker **cur = &gHooks;
(PR_ASSERT(*cur), *cur); /* assert that we find this */
cur = &(*cur)->mNext)
{
for(DHWImportHooker* cur = gHooks; cur; cur = cur->mNext)
if (*cur == this)
{
if(cur->mNext == this)
{
cur->mNext = mNext;
*cur = mNext;
break;
}
PR_ASSERT(cur->mNext); //we were not in the list!
}
}
if(!gHooks)