Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / dom / xslt / xpath / txExpr.cpp
blobd5ea774f62e1c306ec3751ee2980531a4c47bcee
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "txExpr.h"
8 nsresult Expr::evaluateToBool(txIEvalContext* aContext, bool& aResult) {
9 RefPtr<txAExprResult> exprRes;
10 nsresult rv = evaluate(aContext, getter_AddRefs(exprRes));
11 NS_ENSURE_SUCCESS(rv, rv);
13 aResult = exprRes->booleanValue();
15 return NS_OK;
18 nsresult Expr::evaluateToString(txIEvalContext* aContext, nsString& aResult) {
19 RefPtr<txAExprResult> exprRes;
20 nsresult rv = evaluate(aContext, getter_AddRefs(exprRes));
21 NS_ENSURE_SUCCESS(rv, rv);
23 exprRes->stringValue(aResult);
25 return NS_OK;