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

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: Pre-emptively GC a long runnning test 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
Index: public/web/WebElementCollection.h
diff --git a/public/web/WebElementCollection.h b/public/web/WebElementCollection.h
index 6c684c2782e638f6f08091095ecb035dbde8a01b..9e65e5bc17eddcf7c1b4ddff1ff33d88775544dd 100644
--- a/public/web/WebElementCollection.h
+++ b/public/web/WebElementCollection.h
@@ -32,10 +32,12 @@
#ifndef WebElementCollection_h
#define WebElementCollection_h
-#include "../platform/WebCommon.h"
+#include "public/platform/WebCommon.h"
tkent 2014/05/13 11:20:37 Please keep ../. This change will break Chromium
sof 2014/05/15 09:23:24 Reverted, but I notice there are both styles (i.e.
+#include "public/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(); }
haraken 2014/05/12 12:04:13 Nit: If we forget to make this change, do we hit a
sof 2014/05/12 12:24:36 I seem to remember answering this question in some
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;
};

Powered by Google App Engine
This is Rietveld 408576698