mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 09:19:28 +00:00
Flipped the if. Was not continuing on success.
This commit is contained in:
parent
139d5cb27f
commit
9e5b4606dd
@ -116,12 +116,14 @@ nsDOMWindowList::NamedItem(const nsString& aName, nsIDOMWindow** aReturn)
|
||||
mWebShell->FindChildWithName(aName.GetUnicode(), *getter_AddRefs(item));
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> globalObject(do_GetInterface(item));
|
||||
if (NS_WARN_IF_FALSE(globalObject, "Couldn't get to the globalObject")) {
|
||||
*aReturn = nsnull;
|
||||
NS_ASSERTION(globalObject != nsnull, "Couldn't get to the globalObject");
|
||||
if (globalObject) {
|
||||
CallQueryInterface(globalObject.get(), aReturn);
|
||||
}
|
||||
else {
|
||||
*aReturn = nsnull;
|
||||
CallQueryInterface(globalObject.get(), aReturn);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -116,10 +116,10 @@ nsFrameList::NamedItem(const nsString& aName, nsIDOMWindow** aReturn)
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> globalObject(do_GetInterface(item));
|
||||
if (NS_WARN_IF_FALSE(globalObject, "Couldn't get to the globalObject")) {
|
||||
CallQueryInterface(globalObject.get(), aReturn);
|
||||
*aReturn = nsnull;
|
||||
}
|
||||
else {
|
||||
*aReturn = nsnull;
|
||||
CallQueryInterface(globalObject.get(), aReturn);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user