don't assert when not mapping anything without mapping function

Checkin during red tree approved by sar
This commit is contained in:
peterl%netscape.com 1999-01-15 02:08:20 +00:00
parent 5cc1370c12
commit c251f70e4b
2 changed files with 10 additions and 6 deletions

View File

@ -827,9 +827,11 @@ HTMLAttributesImpl::SetMappingFunction(nsMapAttributesFunc aMapFunc)
NS_IMETHODIMP
HTMLAttributesImpl::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
{
NS_ASSERTION(nsnull != mMapper, "no mapping function");
if (nsnull != mMapper) {
(*mMapper)(this, aContext, aPresContext);
if (0 < mCount) {
NS_ASSERTION(nsnull != mMapper, "no mapping function");
if (nsnull != mMapper) {
(*mMapper)(this, aContext, aPresContext);
}
}
return NS_OK;
}

View File

@ -827,9 +827,11 @@ HTMLAttributesImpl::SetMappingFunction(nsMapAttributesFunc aMapFunc)
NS_IMETHODIMP
HTMLAttributesImpl::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
{
NS_ASSERTION(nsnull != mMapper, "no mapping function");
if (nsnull != mMapper) {
(*mMapper)(this, aContext, aPresContext);
if (0 < mCount) {
NS_ASSERTION(nsnull != mMapper, "no mapping function");
if (nsnull != mMapper) {
(*mMapper)(this, aContext, aPresContext);
}
}
return NS_OK;
}