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

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

Issue 1715653002: Fix non-Oilpan ref pointer usage over DOMTokenLists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « third_party/WebKit/Source/core/dom/DOMTokenList.h ('k') | third_party/WebKit/Source/core/html/ClassList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ElementRareData.h
diff --git a/third_party/WebKit/Source/core/dom/ElementRareData.h b/third_party/WebKit/Source/core/dom/ElementRareData.h
index d09bff66af84005a95faa308b3e7c94292e0ac52..f243985db250768f520cd9acad36dcc3ede98ea8 100644
--- a/third_party/WebKit/Source/core/dom/ElementRareData.h
+++ b/third_party/WebKit/Source/core/dom/ElementRareData.h
@@ -88,7 +88,7 @@ public:
void clearComputedStyle() { m_computedStyle = nullptr; }
ClassList* classList() const { return m_classList.get(); }
- void setClassList(PassRefPtrWillBeRawPtr<ClassList> classList) { m_classList = classList; }
+ void setClassList(PassRefPtrWillBeRawPtr<ClassList> classList) { m_classList = classList.leakRef(); }
void clearClassListValueForQuirksMode()
{
if (!m_classList)
@@ -146,7 +146,7 @@ private:
OwnPtrWillBeMember<DatasetDOMStringMap> m_dataset;
OwnPtrWillBeMember<ElementShadow> m_shadow;
- RefPtrWillBeMember<ClassList> m_classList;
+ RawPtrWillBeMember<ClassList> m_classList;
OwnPtrWillBeMember<NamedNodeMap> m_attributeMap;
OwnPtrWillBeMember<AttrNodeList> m_attrNodeList;
OwnPtrWillBeMember<InlineCSSStyleDeclaration> m_cssomWrapper;
@@ -175,6 +175,7 @@ inline ElementRareData::ElementRareData(LayoutObject* layoutObject)
: NodeRareData(layoutObject)
, m_tabindex(0)
, m_minimumSizeForResizing(defaultMinimumSizeForResizing())
+ , m_classList(nullptr)
{
m_isElementRareData = true;
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMTokenList.h ('k') | third_party/WebKit/Source/core/html/ClassList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698