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

Unified Diff: public/web/WebElementCollection.h

Issue 280123002: Oilpan: move LiveNodeList collections to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have NodeRareData clear out NodeListsNodeData instead. Created 6 years, 7 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
« no previous file with comments | « Source/web/tests/TouchActionTest.cpp ('k') | public/web/WebNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebElementCollection.h
diff --git a/public/web/WebElementCollection.h b/public/web/WebElementCollection.h
index 6c684c2782e638f6f08091095ecb035dbde8a01b..28a8ac9b0a939b60be92596a6ee9fb0b3b3468ad 100644
--- a/public/web/WebElementCollection.h
+++ b/public/web/WebElementCollection.h
@@ -33,9 +33,11 @@
#define WebElementCollection_h
#include "../platform/WebCommon.h"
+#include "../platform/WebPrivatePtr.h"
namespace WebCore { class HTMLCollection; }
#if BLINK_IMPLEMENTATION
+#include "platform/heap/Handle.h"
namespace WTF { template <typename T> class PassRefPtr; }
#endif
@@ -47,15 +49,15 @@ class WebElementCollection {
public:
~WebElementCollection() { reset(); }
- WebElementCollection() : m_private(0), m_current(0) { }
- WebElementCollection(const WebElementCollection& n) : m_private(0) { assign(n); }
+ WebElementCollection() : m_current(0) { }
+ WebElementCollection(const WebElementCollection& n) { assign(n); }
WebElementCollection& operator=(const WebElementCollection& n)
{
assign(n);
return *this;
}
- bool isNull() const { return !m_private; }
+ bool isNull() const { return m_private.isNull(); }
BLINK_EXPORT void reset();
BLINK_EXPORT void assign(const WebElementCollection&);
@@ -65,12 +67,12 @@ public:
BLINK_EXPORT WebElement firstItem() const;
#if BLINK_IMPLEMENTATION
- WebElementCollection(const WTF::PassRefPtr<WebCore::HTMLCollection>&);
+ WebElementCollection(const PassRefPtrWillBeRawPtr<WebCore::HTMLCollection>&);
+ WebElementCollection& operator=(const PassRefPtrWillBeRawPtr<WebCore::HTMLCollection>&);
#endif
private:
- void assign(WebCore::HTMLCollection*);
- WebCore::HTMLCollection* m_private;
+ WebPrivatePtr<WebCore::HTMLCollection> m_private;
mutable unsigned m_current;
};
« no previous file with comments | « Source/web/tests/TouchActionTest.cpp ('k') | public/web/WebNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698