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

Side by Side Diff: Source/core/xml/XPathResult.h

Issue 369713002: Remove destructors from ScriptWrappable objects (part 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/xml/XPathNSResolver.cpp ('k') | Source/core/xml/XPathResult.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org>
3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 21 matching lines...) Expand all
32 #include "platform/heap/Handle.h" 32 #include "platform/heap/Handle.h"
33 #include "wtf/Forward.h" 33 #include "wtf/Forward.h"
34 #include "wtf/RefCounted.h" 34 #include "wtf/RefCounted.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 class Document; 38 class Document;
39 class ExceptionState; 39 class ExceptionState;
40 class Node; 40 class Node;
41 41
42 class XPathResult : public RefCountedWillBeGarbageCollectedFinalized<XPathResult >, public ScriptWrappable { 42 class XPathResult FINAL : public RefCountedWillBeGarbageCollected<XPathResult>, public ScriptWrappable {
43 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(XPathResult);
43 public: 44 public:
44 enum XPathResultType { 45 enum XPathResultType {
45 ANY_TYPE = 0, 46 ANY_TYPE = 0,
46 NUMBER_TYPE = 1, 47 NUMBER_TYPE = 1,
47 STRING_TYPE = 2, 48 STRING_TYPE = 2,
48 BOOLEAN_TYPE = 3, 49 BOOLEAN_TYPE = 3,
49 UNORDERED_NODE_ITERATOR_TYPE = 4, 50 UNORDERED_NODE_ITERATOR_TYPE = 4,
50 ORDERED_NODE_ITERATOR_TYPE = 5, 51 ORDERED_NODE_ITERATOR_TYPE = 5,
51 UNORDERED_NODE_SNAPSHOT_TYPE = 6, 52 UNORDERED_NODE_SNAPSHOT_TYPE = 6,
52 ORDERED_NODE_SNAPSHOT_TYPE = 7, 53 ORDERED_NODE_SNAPSHOT_TYPE = 7,
53 ANY_UNORDERED_NODE_TYPE = 8, 54 ANY_UNORDERED_NODE_TYPE = 8,
54 FIRST_ORDERED_NODE_TYPE = 9 55 FIRST_ORDERED_NODE_TYPE = 9
55 }; 56 };
56 57
57 static PassRefPtrWillBeRawPtr<XPathResult> create(Document* document, const XPath::Value& value) 58 static PassRefPtrWillBeRawPtr<XPathResult> create(Document* document, const XPath::Value& value)
58 { 59 {
59 return adoptRefWillBeNoop(new XPathResult(document, value)); 60 return adoptRefWillBeNoop(new XPathResult(document, value));
60 } 61 }
61 ~XPathResult();
62 62
63 void convertTo(unsigned short type, ExceptionState&); 63 void convertTo(unsigned short type, ExceptionState&);
64 64
65 unsigned short resultType() const; 65 unsigned short resultType() const;
66 66
67 double numberValue(ExceptionState&) const; 67 double numberValue(ExceptionState&) const;
68 String stringValue(ExceptionState&) const; 68 String stringValue(ExceptionState&) const;
69 bool booleanValue(ExceptionState&) const; 69 bool booleanValue(ExceptionState&) const;
70 Node* singleNodeValue(ExceptionState&) const; 70 Node* singleNodeValue(ExceptionState&) const;
71 71
(...skipping 14 matching lines...) Expand all
86 unsigned m_nodeSetPosition; 86 unsigned m_nodeSetPosition;
87 OwnPtrWillBeMember<XPath::NodeSet> m_nodeSet; // FIXME: why duplicate the no de set stored in m_value? 87 OwnPtrWillBeMember<XPath::NodeSet> m_nodeSet; // FIXME: why duplicate the no de set stored in m_value?
88 unsigned short m_resultType; 88 unsigned short m_resultType;
89 RefPtrWillBeMember<Document> m_document; 89 RefPtrWillBeMember<Document> m_document;
90 uint64_t m_domTreeVersion; 90 uint64_t m_domTreeVersion;
91 }; 91 };
92 92
93 } // namespace WebCore 93 } // namespace WebCore
94 94
95 #endif // XPathResult_h 95 #endif // XPathResult_h
OLDNEW
« no previous file with comments | « Source/core/xml/XPathNSResolver.cpp ('k') | Source/core/xml/XPathResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698