RESOLVED FIXED 13107
XPath should raise an exception when trying to parse an unknown function
https://bugs.webkit.org/show_bug.cgi?id=13107
Summary XPath should raise an exception when trying to parse an unknown function
Alexey Proskuryakov
Reported 2007-03-18 01:55:41 PDT
Currently, functions with unknown names or with an incorrect number of arguments are silently replaced with true(). This is very confusing - I've been fooled by this several times already when making layout tests to other bugs. Firefox and Opera do raise exceptions here, so I think we should fix this before shipping XPathEvaluator.
Attachments
proposed patch (6.35 KB, patch)
2007-03-18 02:02 PDT, Alexey Proskuryakov
darin: review+
Alexey Proskuryakov
Comment 1 2007-03-18 02:02:43 PDT
Created attachment 13689 [details] proposed patch In Firefox, createExpression doesn't raise an exception if the number of arguments is wrong,but it does for unknown function names (evaluating the expression does cause an exception to be raised, of course). Since expressions are created to be evaluated, this difference doesn't look like a serious issue to me.
Darin Adler
Comment 2 2007-03-19 20:35:12 PDT
Comment on attachment 13689 [details] proposed patch r=me
Alexey Proskuryakov
Comment 3 2007-03-19 23:14:28 PDT
Committed revision 20338.
Note You need to log in before you can comment on or make changes to this bug.