summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-03-19 19:06:05 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-03 01:14:26 +0200
commitf1ff1d89393396b7e1451df3eb03274fb8236a9a (patch)
treeaa26364177c48128d4dea33a2631642aed6d1c2a
parent6db14896affa9e37e9d415abbc805ada663d2d8c (diff)
downloaduxp-f1ff1d89393396b7e1451df3eb03274fb8236a9a.tar.gz
[DOM XSLT] Add fallback value conversions if not converted beforehand.
-rw-r--r--dom/xslt/xslt/txMozillaXSLTProcessor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
index 59cd09bd6a..0df80716c1 100644
--- a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
+++ b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
@@ -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);