Fixing bug 120899. Changing the NS_WARN_IF_FALSE() macro so that it can't be mis-used in optimized builds. This change makes the macro not usable in expressions that are supposed to be evaluated in release code since the macro now expands to nothing in non-debug builds. Also eliminate NS_VALIDATE which is equally mis-usable. r=dbaron@fas.harvard.edu, sr=brendan@mozilla.org

This commit is contained in:
jst%netscape.com 2007-09-06 22:01:19 +00:00
Родитель e5e5134b68
Коммит f1811b4139
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -925,7 +925,13 @@ LocalSearchDataSource::RemoveObserver(nsIRDFObserver *n)
if (! mObservers)
return(NS_OK);
NS_VERIFY(mObservers->RemoveElement(n), "observer not present");
#ifdef DEBUG
PRBool ok =
#endif
mObservers->RemoveElement(n);
NS_ASSERTION(ok, "observer not present");
return(NS_OK);
}