зеркало из https://github.com/mozilla/gecko-dev.git
Bug 485286 - Allocate all of these consistently. r+sr=peterv/sicking (a=ss for checkin into a CLOSED TREE).
This commit is contained in:
Родитель
7dd075fba9
Коммит
77a43455ed
|
@ -388,17 +388,20 @@ nsresult txXSLKey::testNode(const txXPathNode& aNode,
|
|||
PRUint32 currKey, numKeys = mKeys.Length();
|
||||
for (currKey = 0; currKey < numKeys; ++currKey) {
|
||||
if (mKeys[currKey].matchPattern->matches(aNode, &aEs)) {
|
||||
txSingleNodeContext evalContext(aNode, &aEs);
|
||||
nsresult rv = aEs.pushEvalContext(&evalContext);
|
||||
txSingleNodeContext *evalContext =
|
||||
new txSingleNodeContext(aNode, &aEs);
|
||||
NS_ENSURE_TRUE(evalContext, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
nsresult rv = aEs.pushEvalContext(evalContext);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsRefPtr<txAExprResult> exprResult;
|
||||
rv = mKeys[currKey].useExpr->evaluate(&evalContext,
|
||||
rv = mKeys[currKey].useExpr->evaluate(evalContext,
|
||||
getter_AddRefs(exprResult));
|
||||
|
||||
aEs.popEvalContext();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
delete aEs.popEvalContext();
|
||||
|
||||
if (exprResult->getResultType() == txAExprResult::NODESET) {
|
||||
txNodeSet* res = static_cast<txNodeSet*>
|
||||
(static_cast<txAExprResult*>
|
||||
|
|
Загрузка…
Ссылка в новой задаче