Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(985)

Unified Diff: Source/core/xml/XPathExpression.cpp

Issue 17239008: Remove XPathException (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/xml/XPathExpression.cpp
diff --git a/Source/core/xml/XPathExpression.cpp b/Source/core/xml/XPathExpression.cpp
index 164f640c2cbb1fe8f252eb6b64b9ea342fb6aaee..3a96c3e51bf06b8730609dd1e8334bb62d3cbca2 100644
--- a/Source/core/xml/XPathExpression.cpp
+++ b/Source/core/xml/XPathExpression.cpp
@@ -28,7 +28,6 @@
#include "core/xml/XPathExpression.h"
#include "core/dom/ExceptionCode.h"
-#include "core/xml/XPathException.h"
#include "core/xml/XPathExpressionNode.h"
#include "core/xml/XPathNSResolver.h"
#include "core/xml/XPathParser.h"
@@ -73,9 +72,8 @@ PassRefPtr<XPathResult> XPathExpression::evaluate(Node* contextNode, unsigned sh
evaluationContext.node = 0; // Do not hold a reference to the context node, as this may prevent the whole document from being destroyed in time.
if (evaluationContext.hadTypeConversionError) {
- // It is not specified what to do if type conversion fails while evaluating an expression, and INVALID_EXPRESSION_ERR is not exactly right
- // when the failure happens in an otherwise valid expression because of a variable. But XPathEvaluator does not support variables, so it's close enough.
- ec = XPathException::INVALID_EXPRESSION_ERR;
+ // It is not specified what to do if type conversion fails while evaluating an expression.
+ ec = SYNTAX_ERR;
arv (Not doing code reviews) 2013/06/18 19:15:05 It seems like TypeError would be a better fit here
abarth-chromium 2013/06/18 19:30:33 Ok.
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698