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/. */
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();
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
);