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

Unified Diff: Source/core/xml/XPathResult.h

Issue 1099613003: Oilpan: have xml/ objects on the heap by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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/XPathResult.h
diff --git a/Source/core/xml/XPathResult.h b/Source/core/xml/XPathResult.h
index c55a6f6b328a6094f6991b81c7f3d2625e2a4a46..41f50601e91230892686e9fb538a6dec471b361d 100644
--- a/Source/core/xml/XPathResult.h
+++ b/Source/core/xml/XPathResult.h
@@ -31,7 +31,6 @@
#include "core/xml/XPathValue.h"
#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
-#include "wtf/RefCounted.h"
namespace blink {
@@ -43,8 +42,8 @@ namespace XPath {
struct EvaluationContext;
}
-class XPathResult final : public RefCountedWillBeGarbageCollected<XPathResult>, public ScriptWrappable {
- DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(XPathResult);
+// TODO(Oilpan): remove Finalized when transition type for m_document is.
haraken 2015/04/26 15:36:23 One thing we could do is to introduce GarbageColle
+class XPathResult final : public GarbageCollectedFinalized<XPathResult>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
enum XPathResultType {
@@ -60,11 +59,13 @@ public:
FIRST_ORDERED_NODE_TYPE = 9
};
- static PassRefPtrWillBeRawPtr<XPathResult> create(XPath::EvaluationContext& context, const XPath::Value& value)
+ static XPathResult* create(XPath::EvaluationContext& context, const XPath::Value& value)
{
- return adoptRefWillBeNoop(new XPathResult(context, value));
+ return new XPathResult(context, value);
}
+ ~XPathResult();
+
void convertTo(unsigned short type, ExceptionState&);
unsigned short resultType() const;
@@ -89,7 +90,7 @@ private:
XPath::Value m_value;
unsigned m_nodeSetPosition;
- OwnPtrWillBeMember<XPath::NodeSet> m_nodeSet; // FIXME: why duplicate the node set stored in m_value?
+ Member<XPath::NodeSet> m_nodeSet; // FIXME: why duplicate the node set stored in m_value?
unsigned short m_resultType;
RefPtrWillBeMember<Document> m_document;
uint64_t m_domTreeVersion;

Powered by Google App Engine
This is Rietveld 408576698