зеркало из https://github.com/mozilla/pjs.git
fixes bug 272122 "Crash in xf:output" patch by smaug@welho.com r=darin
This commit is contained in:
Родитель
733ff747a7
Коммит
5edee8c807
|
@ -259,15 +259,16 @@ nsXFormsOutputElement::Refresh()
|
||||||
|
|
||||||
if (hasRef) {
|
if (hasRef) {
|
||||||
nsCOMPtr<nsIDOMNode> resultNode;
|
nsCOMPtr<nsIDOMNode> resultNode;
|
||||||
result->GetSingleNodeValue(getter_AddRefs(resultNode));
|
rv = result->GetSingleNodeValue(getter_AddRefs(resultNode));
|
||||||
nsXFormsUtils::GetNodeValue(resultNode, text);
|
if (resultNode)
|
||||||
|
nsXFormsUtils::GetNodeValue(resultNode, text);
|
||||||
} else {
|
} else {
|
||||||
rv = result->GetStringValue(text);
|
rv = result->GetStringValue(text);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
}
|
}
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
nsCOMPtr<nsIDOM3Node> dom3Node = do_QueryInterface(mHTMLElement);
|
nsCOMPtr<nsIDOM3Node> dom3Node = do_QueryInterface(mHTMLElement);
|
||||||
NS_ENSURE_TRUE(mHTMLElement, NS_ERROR_FAILURE);
|
NS_ENSURE_STATE(dom3Node);
|
||||||
rv = dom3Node->SetTextContent(text);
|
rv = dom3Node->SetTextContent(text);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче