summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-03-19 19:06:05 +0000
committerMoonchild <moonchild@palemoon.org>2022-03-21 13:26:24 +0000
commitfcf40fb6ef6f254b4b9e79ecaf85dd3a9151f00c (patch)
treef6c0f5152b67832d0c7504e62447b67c1bfacf04 /dom
parentf5f6f9c18b1f32b50c4b6f02c873c749b73316fc (diff)
downloadaura-central-fcf40fb6ef6f254b4b9e79ecaf85dd3a9151f00c.tar.gz
[DOM XSLT] Add fallback value conversions if not converted beforehand.
Diffstat (limited to 'dom')
-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 59cd09bd6..0df80716c 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);