summaryrefslogtreecommitdiff
path: root/Source/WebCore/xml/XPathExpression.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/xml/XPathExpression.h')
-rw-r--r--Source/WebCore/xml/XPathExpression.h42
1 files changed, 18 insertions, 24 deletions
diff --git a/Source/WebCore/xml/XPathExpression.h b/Source/WebCore/xml/XPathExpression.h
index 8fd2a3eed..5a478a82e 100644
--- a/Source/WebCore/xml/XPathExpression.h
+++ b/Source/WebCore/xml/XPathExpression.h
@@ -24,37 +24,31 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef XPathExpression_h
-#define XPathExpression_h
+#pragma once
-#include <wtf/Forward.h>
-#include <wtf/RefCounted.h>
+#include "ExceptionOr.h"
namespace WebCore {
- typedef int ExceptionCode;
+class Node;
+class XPathNSResolver;
+class XPathResult;
- class Node;
- class XPathNSResolver;
- class XPathResult;
+namespace XPath {
+class Expression;
+}
- namespace XPath {
- class Expression;
- }
+class XPathExpression : public RefCounted<XPathExpression> {
+public:
+ static ExceptionOr<Ref<XPathExpression>> createExpression(const String& expression, RefPtr<XPathNSResolver>&&);
+ WEBCORE_EXPORT ~XPathExpression();
- class XPathExpression : public RefCounted<XPathExpression> {
- public:
- static PassRefPtr<XPathExpression> createExpression(const String& expression, XPathNSResolver*, ExceptionCode&);
- ~XPathExpression();
-
- PassRefPtr<XPathResult> evaluate(Node* contextNode, unsigned short type, XPathResult*, ExceptionCode&);
-
- private:
- explicit XPathExpression(std::unique_ptr<XPath::Expression>);
+ WEBCORE_EXPORT ExceptionOr<Ref<XPathResult>> evaluate(Node* contextNode, unsigned short type, XPathResult*);
- std::unique_ptr<XPath::Expression> m_topExpression;
- };
+private:
+ explicit XPathExpression(std::unique_ptr<XPath::Expression>);
-}
+ std::unique_ptr<XPath::Expression> m_topExpression;
+};
-#endif // XPathExpression_h
+}