Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/xslt/xpath/txExpr.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/. */
5
6
#include "txExpr.h"
7
8
nsresult
9
Expr::evaluateToBool(txIEvalContext* aContext, bool& aResult)
10
0
{
11
0
    RefPtr<txAExprResult> exprRes;
12
0
    nsresult rv = evaluate(aContext, getter_AddRefs(exprRes));
13
0
    NS_ENSURE_SUCCESS(rv, rv);
14
0
15
0
    aResult = exprRes->booleanValue();
16
0
17
0
    return NS_OK;
18
0
}
19
20
nsresult
21
Expr::evaluateToString(txIEvalContext* aContext, nsString& aResult)
22
0
{
23
0
    RefPtr<txAExprResult> exprRes;
24
0
    nsresult rv = evaluate(aContext, getter_AddRefs(exprRes));
25
0
    NS_ENSURE_SUCCESS(rv, rv);
26
0
27
0
    exprRes->stringValue(aResult);
28
0
29
0
    return NS_OK;
30
0
}