Fixing bogus assertions caused by my checkins for bug 118933 and removing unnecessary double null check. trivial change, no reviews.

git-svn-id: svn://10.0.0.236/trunk@112403 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%netscape.com 2002-01-17 22:12:28 +00:00
parent 76737b8259
commit 2cdcc5b19e
2 changed files with 22 additions and 24 deletions

View File

@ -397,20 +397,19 @@ nsScriptNameSpaceManager::RegisterClassName(const char *aClassName,
nsGlobalNameStruct *s = AddToHash(NS_ConvertASCIItoUCS2(aClassName));
NS_ENSURE_TRUE(s, NS_ERROR_OUT_OF_MEMORY);
if (s) {
if (s->mType == nsGlobalNameStruct::eTypeClassConstructor) {
return NS_OK;
}
// If a external constructor is already defined with aClassName we
// won't overwrite it.
if (s->mType == nsGlobalNameStruct::eTypeExternalConstructor) {
return NS_OK;
}
if (s->mType == nsGlobalNameStruct::eTypeClassConstructor) {
return NS_OK;
}
NS_ASSERTION(!(s && s->mType != nsGlobalNameStruct::eTypeInterface),
// If a external constructor is already defined with aClassName we
// won't overwrite it.
if (s->mType == nsGlobalNameStruct::eTypeExternalConstructor) {
return NS_OK;
}
NS_ASSERTION(!(s->mType != nsGlobalNameStruct::eTypeNotInitialized &&
s->mType != nsGlobalNameStruct::eTypeInterface),
"Whaaa, JS environment name clash!");
s->mType = nsGlobalNameStruct::eTypeClassConstructor;

View File

@ -397,20 +397,19 @@ nsScriptNameSpaceManager::RegisterClassName(const char *aClassName,
nsGlobalNameStruct *s = AddToHash(NS_ConvertASCIItoUCS2(aClassName));
NS_ENSURE_TRUE(s, NS_ERROR_OUT_OF_MEMORY);
if (s) {
if (s->mType == nsGlobalNameStruct::eTypeClassConstructor) {
return NS_OK;
}
// If a external constructor is already defined with aClassName we
// won't overwrite it.
if (s->mType == nsGlobalNameStruct::eTypeExternalConstructor) {
return NS_OK;
}
if (s->mType == nsGlobalNameStruct::eTypeClassConstructor) {
return NS_OK;
}
NS_ASSERTION(!(s && s->mType != nsGlobalNameStruct::eTypeInterface),
// If a external constructor is already defined with aClassName we
// won't overwrite it.
if (s->mType == nsGlobalNameStruct::eTypeExternalConstructor) {
return NS_OK;
}
NS_ASSERTION(!(s->mType != nsGlobalNameStruct::eTypeNotInitialized &&
s->mType != nsGlobalNameStruct::eTypeInterface),
"Whaaa, JS environment name clash!");
s->mType = nsGlobalNameStruct::eTypeClassConstructor;