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

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

Issue 317203005: Oilpan: Temporary fix for leaks through mapping from element to attribute node list. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Maintain Attr value when Element is deent dies. Created 6 years, 6 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/Attr.h
diff --git a/Source/core/dom/Attr.h b/Source/core/dom/Attr.h
index b6b2b4d362cf339423ffc2e85de3264af8852fae..36b715f60b09a0e055f2868fc3320ff3e9148fea 100644
--- a/Source/core/dom/Attr.h
+++ b/Source/core/dom/Attr.h
@@ -64,6 +64,7 @@ public:
const AtomicString& prefix() const { return m_name.prefix(); }
virtual void trace(Visitor*) OVERRIDE;
+ void clearWeakMembers(Visitor*);
private:
Attr(Element&, const QualifiedName&);
@@ -89,7 +90,13 @@ private:
// Attr wraps either an element/name, or a name/value pair (when it's a standalone Node.)
// Note that m_name is always set, but m_element/m_standaloneValue may be null.
- RawPtrWillBeMember<Element> m_element;
+ //
+ // FIXME: Oilpan: m_element should be a Member. However, because of the
+ // current semantics of weak maps, we have to make it a WeakMember in order
+ // to not leak through the attrNodeListMap in Element.cpp. Once the semantics
+ // of weak maps has changed we should make this a Member and remove the custom
+ // weak processing.
+ RawPtrWillBeWeakMember<Element> m_element;
QualifiedName m_name;
// Holds the value if it is a standalone Node, or the local name of the
// attribute it is attached to on an Element. The latter may (letter case)
« no previous file with comments | « LayoutTests/fast/dom/Attr/script-tests/access-after-element-destruction.js ('k') | Source/core/dom/Attr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698