Bug 740526. Change LookupName to return the nsGlobalNameStruct as a return value, not an out param. r=bzbarsky

This commit is contained in:
Peter Van der Beken
2012-03-29 11:43:13 -07:00
parent 767631502c
commit 0f4c97c00e
4 changed files with 25 additions and 25 deletions

View File

@@ -498,10 +498,9 @@ nsScriptNameSpaceManager::InitForContext(nsIScriptContext *aContext)
return closure.rv;
}
nsresult
nsScriptNameSpaceManager::LookupName(const nsAString& aName,
const nsGlobalNameStruct **aNameStruct,
const PRUnichar **aClassName)
nsGlobalNameStruct*
nsScriptNameSpaceManager::LookupNameInternal(const nsAString& aName,
const PRUnichar **aClassName)
{
GlobalNameMapEntry *entry =
static_cast<GlobalNameMapEntry *>
@@ -510,18 +509,16 @@ nsScriptNameSpaceManager::LookupName(const nsAString& aName,
if (PL_DHASH_ENTRY_IS_BUSY(entry) &&
!((&entry->mGlobalName)->mDisabled)) {
*aNameStruct = &entry->mGlobalName;
if (aClassName) {
*aClassName = entry->mKey.get();
}
} else {
*aNameStruct = nsnull;
if (aClassName) {
*aClassName = nsnull;
}
return &entry->mGlobalName;
}
return NS_OK;
if (aClassName) {
*aClassName = nsnull;
}
return nsnull;
}
nsresult