Bug 740526. Change LookupName to return the nsGlobalNameStruct as a return value, not an out param. r=bzbarsky
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user