Crash fix: hold a strong reference to |root| in nsHTMLDocument::SetBody.

This commit is contained in:
Pale Moon
2016-03-29 23:58:04 +02:00
parent d8706b19d9
commit f177427333
+1 -1
View File
@@ -1113,7 +1113,7 @@ nsHTMLDocument::SetBody(nsIDOMHTMLElement* aBody)
void
nsHTMLDocument::SetBody(nsGenericHTMLElement* newBody, ErrorResult& rv)
{
Element* root = GetRootElement();
nsCOMPtr<Element> root = GetRootElement();
// The body element must be either a body tag or a frameset tag. And we must
// have a html root tag, otherwise GetBody will not return the newly set