Bug 378829 - "ASSERTION: Creation of FunctionCall failed" with XPath "z()"; (Av1) Remove bogus assertion.
authorSerge Gautherie <sgautherie.bz@free.fr>
Wed, 07 Apr 2010 20:03:36 +0200
changeset 40544 24f6f5e405f7e465e437d0b1855b798c6c5bd860
parent 40540 f843e0928e1119d1fbafba72e5ed1aea575fbbe5
child 40545 0d087417c11fc35c09009301a01d72d78dbd8c5c
push id12659
push usersgautherie.bz@free.fr
push dateWed, 07 Apr 2010 18:05:07 +0000
treeherdermozilla-central@24f6f5e405f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs378829
milestone1.9.3a4pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 378829 - "ASSERTION: Creation of FunctionCall failed" with XPath "z()"; (Av1) Remove bogus assertion. r=jonas.
content/xslt/src/xpath/txExprParser.cpp
--- a/content/xslt/src/xpath/txExprParser.cpp
+++ b/content/xslt/src/xpath/txExprParser.cpp
@@ -465,36 +465,36 @@ txExprParser::createFunctionCall(txExprL
 
     txCoreFunctionCall::eType type;
     if (namespaceID == kNameSpaceID_None &&
         txCoreFunctionCall::getTypeFromAtom(lName, type)) {
         // It is a known built-in function.
         fnCall = new txCoreFunctionCall(type);
         NS_ENSURE_TRUE(fnCall, NS_ERROR_OUT_OF_MEMORY);
     }
+
     // check extension functions and xslt
     if (!fnCall) {
         rv = aContext->resolveFunctionCall(lName, namespaceID,
                                            getter_Transfers(fnCall));
 
         if (rv == NS_ERROR_NOT_IMPLEMENTED) {
             // this should just happen for unparsed-entity-uri()
             NS_ASSERTION(!fnCall, "Now is it implemented or not?");
             rv = parseParameters(0, lexer, aContext);
             NS_ENSURE_SUCCESS(rv, rv);
+
             *aResult = new txLiteralExpr(tok->Value() +
                                          NS_LITERAL_STRING(" not implemented."));
             NS_ENSURE_TRUE(*aResult, NS_ERROR_OUT_OF_MEMORY);
+
             return NS_OK;
         }
 
-        if (NS_FAILED(rv)) {
-            NS_ERROR("Creation of FunctionCall failed");
-            return rv;
-        }
+        NS_ENSURE_SUCCESS(rv, rv);
     }
 
     //-- handle parametes
     rv = parseParameters(fnCall, lexer, aContext);
     NS_ENSURE_SUCCESS(rv, rv);
 
     *aResult = fnCall.forget();
     return NS_OK;