Fix compiler warning b=229540 p=gautheri@noos.fr r=danm sr=alecf

This commit is contained in:
neil%parkwaycc.co.uk 2004-01-22 13:13:09 +00:00
Родитель f5b529d654
Коммит 29fa9e3ab1
1 изменённых файлов: 5 добавлений и 7 удалений

Просмотреть файл

@ -58,8 +58,8 @@
static nsresult GetDOMWindow(nsIXULWindow* inWindow,
nsCOMPtr<nsIDOMWindowInternal> &outDOMWindow);
static nsCOMPtr<nsIDOMNode> GetDOMNodeFromDocShell(nsIDocShell *aShell);
static void GetAttribute( nsIXULWindow* inWindow,
const nsAutoString& inAttribute, nsAutoString& outValue);
static void GetAttribute(nsIXULWindow *inWindow, const nsAString &inAttribute,
nsAString &outValue);
static void GetWindowType(nsIXULWindow* inWindow, nsString &outType);
// fetch the nsIDOMWindow(Internal) from a XUL Window
@ -101,19 +101,17 @@ nsCOMPtr<nsIDOMNode> GetDOMNodeFromDocShell(nsIDocShell *aShell)
}
// generic "retrieve the value of a XUL attribute" function
void GetAttribute(nsIXULWindow* aWindow, const nsAString &anAttribute,
void GetAttribute(nsIXULWindow *inWindow, const nsAString &inAttribute,
nsAString &outValue)
{
nsCOMPtr<nsIDocShell> shell;
if (aWindow &&
NS_SUCCEEDED(aWindow->GetDocShell(getter_AddRefs(shell)))) {
if (inWindow && NS_SUCCEEDED(inWindow->GetDocShell(getter_AddRefs(shell)))) {
nsCOMPtr<nsIDOMNode> node(GetDOMNodeFromDocShell(shell));
if (node) {
nsCOMPtr<nsIDOMElement> webshellElement(do_QueryInterface(node));
if (webshellElement)
webshellElement->GetAttribute(anAttribute, outValue);
webshellElement->GetAttribute(inAttribute, outValue);
}
}
}