Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/xslt/xpath/txForwardContext.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 "txForwardContext.h"
7
#include "txNodeSet.h"
8
9
const txXPathNode& txForwardContext::getContextNode()
10
0
{
11
0
    return mContextNode;
12
0
}
13
14
uint32_t txForwardContext::size()
15
0
{
16
0
    return (uint32_t)mContextSet->size();
17
0
}
18
19
uint32_t txForwardContext::position()
20
0
{
21
0
    int32_t pos = mContextSet->indexOf(mContextNode);
22
0
    NS_ASSERTION(pos >= 0, "Context is not member of context node list.");
23
0
    return (uint32_t)(pos + 1);
24
0
}
25
26
nsresult txForwardContext::getVariable(int32_t aNamespace, nsAtom* aLName,
27
                                       txAExprResult*& aResult)
28
0
{
29
0
    NS_ASSERTION(mInner, "mInner is null!!!");
30
0
    return mInner->getVariable(aNamespace, aLName, aResult);
31
0
}
32
33
nsresult
34
txForwardContext::isStripSpaceAllowed(const txXPathNode& aNode, bool& aAllowed)
35
0
{
36
0
    NS_ASSERTION(mInner, "mInner is null!!!");
37
0
    return mInner->isStripSpaceAllowed(aNode, aAllowed);
38
0
}
39
40
void* txForwardContext::getPrivateContext()
41
0
{
42
0
    NS_ASSERTION(mInner, "mInner is null!!!");
43
0
    return mInner->getPrivateContext();
44
0
}
45
46
txResultRecycler* txForwardContext::recycler()
47
0
{
48
0
    NS_ASSERTION(mInner, "mInner is null!!!");
49
0
    return mInner->recycler();
50
0
}
51
52
void txForwardContext::receiveError(const nsAString& aMsg, nsresult aRes)
53
0
{
54
0
    NS_ASSERTION(mInner, "mInner is null!!!");
55
#ifdef DEBUG
56
    nsAutoString error(NS_LITERAL_STRING("forwarded error: "));
57
    error.Append(aMsg);
58
    mInner->receiveError(error, aRes);
59
#else
60
    mInner->receiveError(aMsg, aRes);
61
0
#endif
62
0
}