[DOM XSLT] Add fallback value conversions if not converted beforehand.

This commit is contained in:
Moonchild 2022-03-19 19:06:05 +00:00 committed by roytam1
commit bf80b78247

View file

@ -250,7 +250,13 @@ public:
}
nsresult getValue(txAExprResult** aValue)
{
NS_ASSERTION(mTxValue, "variablevalue is null");
if (!mTxValue) {
// XXX: This should not happen as we normally convert values before
// we call this function. For corner cases where this isn't true, we
// perform the conversion here.
nsresult rv = Convert(mValue, getter_AddRefs(mTxValue));
NS_ENSURE_SUCCESS(rv, rv);
}
*aValue = mTxValue;
NS_ADDREF(*aValue);