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:
parent
76737b8259
commit
2cdcc5b19e
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user