Changeset 44361 in webkit for trunk/WebCore/xml/XPathExpression.cpp
- Timestamp:
- Jun 2, 2009, 10:59:09 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/xml/XPathExpression.cpp
r44317 r44361 31 31 32 32 #include "Document.h" 33 #include "ExceptionCode.h"34 #include "Node.h"35 33 #include "PlatformString.h" 34 #include "XPathException.h" 36 35 #include "XPathExpressionNode.h" 37 36 #include "XPathNSResolver.h" … … 72 71 evaluationContext.size = 1; 73 72 evaluationContext.position = 1; 73 evaluationContext.hadTypeConversionError = false; 74 74 RefPtr<XPathResult> result = XPathResult::create(contextNode->document(), m_topExpression->evaluate()); 75 75 evaluationContext.node = 0; // Do not hold a reference to the context node, as this may prevent the whole document from being destroyed in time. 76 77 if (evaluationContext.hadTypeConversionError) { 78 // It is not specified what to do if type conversion fails while evaluating an expression, and INVALID_EXPRESSION_ERR is not exactly right 79 // when the failure happens in an otherwise valid expression because of a variable. But XPathEvaluator does not support variables, so it's close enough. 80 ec = XPathException::INVALID_EXPRESSION_ERR; 81 return 0; 82 } 76 83 77 84 if (type != XPathResult::ANY_TYPE) {
Note:
See TracChangeset
for help on using the changeset viewer.