Fix bug 32904 Asserts at startup in nsScriptSecurityManager.cpp

r=mstoltz


git-svn-id: svn://10.0.0.236/trunk@63928 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
norris%netscape.com
2000-03-23 23:42:46 +00:00
parent 920aad1008
commit a563d78680
4 changed files with 81 additions and 60 deletions

View File

@@ -1595,6 +1595,14 @@ nsScriptSecurityManager::InitFromPrefs()
NS_ASSERTION(NS_DOM_PROP_MAX == sizeof(domPropNames)/sizeof(domPropNames[0]),
"mismatch in property name count");
// The DOM property names had better be sorted for binary search to work
#ifdef DEBUG
for (unsigned i=1; i < sizeof(domPropNames)/sizeof(domPropNames[0]); i++) {
NS_ASSERTION(strcmp(domPropNames[i-1], domPropNames[i]) < 0,
"DOM properties are not properly sorted");
}
#endif
nsresult rv;
NS_WITH_SERVICE(nsIPref, prefs, kPrefServiceCID, &rv);
if (NS_FAILED(rv))