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

Unified Diff: Source/core/dom/ElementRareData.h

Issue 265793017: Oilpan: move node/element rare data objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Implement a weak-like Node reference from a MO registration object 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: Source/core/dom/ElementRareData.h
diff --git a/Source/core/dom/ElementRareData.h b/Source/core/dom/ElementRareData.h
index c3419e84a66503b765a8c6f16a53584c67558cd5..644e024442368b92f07e6b90398d33076530afa1 100644
--- a/Source/core/dom/ElementRareData.h
+++ b/Source/core/dom/ElementRareData.h
@@ -32,6 +32,7 @@
#include "core/html/ClassList.h"
#include "core/html/ime/InputMethodContext.h"
#include "core/rendering/style/StyleInheritedData.h"
+#include "platform/heap/Handle.h"
#include "wtf/OwnPtr.h"
namespace WebCore {
@@ -40,9 +41,9 @@ class HTMLElement;
class ElementRareData : public NodeRareData {
public:
- static PassOwnPtr<ElementRareData> create(RenderObject* renderer)
+ static RawPtr<ElementRareData> create(RenderObject* renderer)
haraken 2014/05/07 02:10:26 This could be ElementRareData*.
{
- return adoptPtr(new ElementRareData(renderer));
+ return new ElementRareData(renderer);
}
~ElementRareData();
@@ -119,15 +120,7 @@ public:
void setCustomElementDefinition(PassRefPtr<CustomElementDefinition> definition) { m_customElementDefinition = definition; }
CustomElementDefinition* customElementDefinition() const { return m_customElementDefinition.get(); }
- void trace(Visitor* visitor)
- {
- // FIXME: Oilpan: Implement real tracing of the
- // ElementRareData when it has been moved to the
- // oilpan heap and move the ElementShadow tracing
- // to the ElementShadow when that has been moved
- // to the oilpan heap.
- visitor->trace(m_shadow);
- }
+ void traceAfterDispatch(Visitor*);
private:
short m_tabindex;
@@ -136,10 +129,10 @@ private:
OwnPtr<DatasetDOMStringMap> m_dataset;
OwnPtr<ClassList> m_classList;
- OwnPtr<ElementShadow> m_shadow;
+ OwnPtrWillBeMember<ElementShadow> m_shadow;
OwnPtr<NamedNodeMap> m_attributeMap;
OwnPtr<InputMethodContext> m_inputMethodContext;
- OwnPtrWillBePersistent<ActiveAnimations> m_activeAnimations;
+ OwnPtrWillBeMember<ActiveAnimations> m_activeAnimations;
OwnPtr<InlineCSSStyleDeclaration> m_cssomWrapper;
RefPtr<RenderStyle> m_computedStyle;
@@ -156,11 +149,14 @@ inline ElementRareData::ElementRareData(RenderObject* renderer)
: NodeRareData(renderer)
, m_tabindex(0)
{
+ m_isElementRareData = true;
}
inline ElementRareData::~ElementRareData()
{
+#if !ENABLE(OILPAN)
ASSERT(!m_shadow);
+#endif
ASSERT(!m_generatedBefore);
ASSERT(!m_generatedAfter);
ASSERT(!m_backdrop);

Powered by Google App Engine
This is Rietveld 408576698