From 80fd3ebd9ebeeb86c6cc68630bee5ec728f5aed7 Mon Sep 17 00:00:00 2001 From: "caillon%returnzero.com" Date: Mon, 16 Jun 2003 21:47:16 +0000 Subject: [PATCH] 209583 - Fix a regression where XMLDocument.getElementByID() was broken r+sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@143774 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/xml/content/src/nsXMLElement.cpp | 14 +++++++------- mozilla/content/xml/content/src/nsXMLElement.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mozilla/content/xml/content/src/nsXMLElement.cpp b/mozilla/content/xml/content/src/nsXMLElement.cpp index a7bb0e3789f..de3c519c585 100644 --- a/mozilla/content/xml/content/src/nsXMLElement.cpp +++ b/mozilla/content/xml/content/src/nsXMLElement.cpp @@ -742,19 +742,19 @@ nsXMLElement::GetScriptObject(nsIScriptContext* aContext, void** aScriptObject) // nsIStyledContent implementation NS_IMETHODIMP -nsXMLElement::GetID(nsIAtom*& aResult) const +nsXMLElement::GetID(nsIAtom** aResult) const { - nsresult rv; nsCOMPtr atom; - rv = mNodeInfo->GetIDAttributeAtom(getter_AddRefs(atom)); - - aResult = nsnull; + nsresult rv = mNodeInfo->GetIDAttributeAtom(getter_AddRefs(atom)); + + *aResult = nsnull; if (NS_SUCCEEDED(rv) && atom) { nsAutoString value; rv = nsGenericContainerElement::GetAttr(kNameSpaceID_Unknown, atom, value); - if (NS_SUCCEEDED(rv)) - aResult = NS_NewAtom(value); + if (NS_SUCCEEDED(rv)) { + *aResult = NS_NewAtom(value); + } } return rv; diff --git a/mozilla/content/xml/content/src/nsXMLElement.h b/mozilla/content/xml/content/src/nsXMLElement.h index 85dd597169c..4be91205b30 100644 --- a/mozilla/content/xml/content/src/nsXMLElement.h +++ b/mozilla/content/xml/content/src/nsXMLElement.h @@ -72,7 +72,7 @@ public: NS_IMETHOD GetXMLBaseURI(nsIURI **aURI); // nsIStyledContent - NS_IMETHOD GetID(nsIAtom*& aResult) const; + NS_IMETHOD GetID(nsIAtom** aResult) const; // nsIContent NS_IMETHOD SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,