diff --git a/content/base/src/nsStyleSet.cpp b/content/base/src/nsStyleSet.cpp index 55cc345c1e2..8628adb3df8 100644 --- a/content/base/src/nsStyleSet.cpp +++ b/content/base/src/nsStyleSet.cpp @@ -1572,19 +1572,12 @@ nsresult StyleContextCache::AddContext(scKey aKey, nsIStyleContext *aContext) nsVoidArray *pList = GetList(aKey); NS_ASSERTION(pList != nsnull, "VerifyList failed me!"); NS_ASSERTION(pList->IndexOf(aContext) == -1, "Context already in list"); - if(pList->IndexOf(aContext) == -1){ - if (!(pList->AppendElement(aContext))) { - rv = NS_ERROR_FAILURE; - } else { - mCount++; - } - DumpStats(); - } else { -#ifdef DEBUG - printf( "Context already in list in StyleContextCache::AddContext\n"); -#endif + if (!(pList->AppendElement(aContext))) { rv = NS_ERROR_FAILURE; + } else { + mCount++; } + DumpStats(); } return rv; } diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp index 55cc345c1e2..8628adb3df8 100644 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp @@ -1572,19 +1572,12 @@ nsresult StyleContextCache::AddContext(scKey aKey, nsIStyleContext *aContext) nsVoidArray *pList = GetList(aKey); NS_ASSERTION(pList != nsnull, "VerifyList failed me!"); NS_ASSERTION(pList->IndexOf(aContext) == -1, "Context already in list"); - if(pList->IndexOf(aContext) == -1){ - if (!(pList->AppendElement(aContext))) { - rv = NS_ERROR_FAILURE; - } else { - mCount++; - } - DumpStats(); - } else { -#ifdef DEBUG - printf( "Context already in list in StyleContextCache::AddContext\n"); -#endif + if (!(pList->AppendElement(aContext))) { rv = NS_ERROR_FAILURE; + } else { + mCount++; } + DumpStats(); } return rv; }