зеркало из https://github.com/mozilla/gecko-dev.git
fix memory leak of nsIURI in Set and GetAttribute r=waterson
This commit is contained in:
Родитель
66a52807fc
Коммит
cca5e191f9
|
@ -2296,9 +2296,9 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID,
|
|||
// know about the StyleRule change.
|
||||
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kStyleAtom) {
|
||||
|
||||
nsIURI* docURL = nsnull;
|
||||
nsCOMPtr <nsIURI> docURL;
|
||||
if (nsnull != mDocument) {
|
||||
mDocument->GetBaseURL(docURL);
|
||||
mDocument->GetBaseURL(*getter_AddRefs(docURL));
|
||||
}
|
||||
|
||||
mAttributes->UpdateStyleRule(docURL, aValue);
|
||||
|
@ -2574,9 +2574,9 @@ RDFElementImpl::UnsetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNot
|
|||
|
||||
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kStyleAtom) {
|
||||
|
||||
nsIURI* docURL = nsnull;
|
||||
nsCOMPtr <nsIURI> docURL;
|
||||
if (nsnull != mDocument) {
|
||||
mDocument->GetBaseURL(docURL);
|
||||
mDocument->GetBaseURL(*getter_AddRefs(docURL));
|
||||
}
|
||||
|
||||
mAttributes->UpdateStyleRule(docURL, "");
|
||||
|
|
|
@ -2296,9 +2296,9 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID,
|
|||
// know about the StyleRule change.
|
||||
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kStyleAtom) {
|
||||
|
||||
nsIURI* docURL = nsnull;
|
||||
nsCOMPtr <nsIURI> docURL;
|
||||
if (nsnull != mDocument) {
|
||||
mDocument->GetBaseURL(docURL);
|
||||
mDocument->GetBaseURL(*getter_AddRefs(docURL));
|
||||
}
|
||||
|
||||
mAttributes->UpdateStyleRule(docURL, aValue);
|
||||
|
@ -2574,9 +2574,9 @@ RDFElementImpl::UnsetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNot
|
|||
|
||||
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kStyleAtom) {
|
||||
|
||||
nsIURI* docURL = nsnull;
|
||||
nsCOMPtr <nsIURI> docURL;
|
||||
if (nsnull != mDocument) {
|
||||
mDocument->GetBaseURL(docURL);
|
||||
mDocument->GetBaseURL(*getter_AddRefs(docURL));
|
||||
}
|
||||
|
||||
mAttributes->UpdateStyleRule(docURL, "");
|
||||
|
|
|
@ -2296,9 +2296,9 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID,
|
|||
// know about the StyleRule change.
|
||||
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kStyleAtom) {
|
||||
|
||||
nsIURI* docURL = nsnull;
|
||||
nsCOMPtr <nsIURI> docURL;
|
||||
if (nsnull != mDocument) {
|
||||
mDocument->GetBaseURL(docURL);
|
||||
mDocument->GetBaseURL(*getter_AddRefs(docURL));
|
||||
}
|
||||
|
||||
mAttributes->UpdateStyleRule(docURL, aValue);
|
||||
|
@ -2574,9 +2574,9 @@ RDFElementImpl::UnsetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNot
|
|||
|
||||
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kStyleAtom) {
|
||||
|
||||
nsIURI* docURL = nsnull;
|
||||
nsCOMPtr <nsIURI> docURL;
|
||||
if (nsnull != mDocument) {
|
||||
mDocument->GetBaseURL(docURL);
|
||||
mDocument->GetBaseURL(*getter_AddRefs(docURL));
|
||||
}
|
||||
|
||||
mAttributes->UpdateStyleRule(docURL, "");
|
||||
|
|
Загрузка…
Ссылка в новой задаче