mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 00:55:37 +00:00
Fix for bug 241058. Debug only crash due to nsCOMPtr's internal checks when QI'ing. r+sr=bzbarsky@mit.edu
This commit is contained in:
parent
ea6ba72e90
commit
f3889c559f
@ -145,14 +145,12 @@ nsHTMLSharedListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
||||
NS_ENSURE_ARG_POINTER(aReturn);
|
||||
*aReturn = nsnull;
|
||||
|
||||
nsHTMLSharedListElement* it = new nsHTMLSharedListElement();
|
||||
nsRefPtr<nsHTMLSharedListElement> it = new nsHTMLSharedListElement();
|
||||
|
||||
if (!it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLOListElement> kungFuDeathGrip(it);
|
||||
|
||||
nsresult rv = it->Init(mNodeInfo);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -198,15 +198,12 @@ nsHTMLSharedElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
||||
NS_ENSURE_ARG_POINTER(aReturn);
|
||||
*aReturn = nsnull;
|
||||
|
||||
nsHTMLSharedElement* it = new nsHTMLSharedElement();
|
||||
nsRefPtr<nsHTMLSharedElement> it = new nsHTMLSharedElement();
|
||||
|
||||
if (!it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISupports> kungFuDeathGrip =
|
||||
NS_STATIC_CAST(nsIDOMHTMLEmbedElement *, it);
|
||||
|
||||
nsresult rv = it->Init(mNodeInfo);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -143,14 +143,12 @@ nsHTMLObjectElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
||||
NS_ENSURE_ARG_POINTER(aReturn);
|
||||
*aReturn = nsnull;
|
||||
|
||||
nsHTMLObjectElement* it = new nsHTMLObjectElement();
|
||||
nsRefPtr<nsHTMLObjectElement> it = new nsHTMLObjectElement();
|
||||
|
||||
if (!it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
|
||||
nsresult rv = it->Init(mNodeInfo);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
|
Loading…
Reference in New Issue
Block a user