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

Unified Diff: Source/core/html/FormAssociatedElement.cpp

Issue 271533009: Oilpan: Prepare to move FormAssociatedElement to Oilpan heap, part 1. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove using 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/core/html/FormAssociatedElement.h ('k') | Source/core/html/HTMLFormControlElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/FormAssociatedElement.cpp
diff --git a/Source/core/html/FormAssociatedElement.cpp b/Source/core/html/FormAssociatedElement.cpp
index 46fc8b51335a12c36166786b6ebba8fa67ca7b35..8e49a61d269d52d2bea2e5eefa612ca6cd54cbfb 100644
--- a/Source/core/html/FormAssociatedElement.cpp
+++ b/Source/core/html/FormAssociatedElement.cpp
@@ -58,6 +58,12 @@ FormAssociatedElement::~FormAssociatedElement()
// We can't call setForm here because it contains virtual calls.
}
+void FormAssociatedElement::trace(Visitor* visitor)
+{
+ visitor->trace(m_form);
+ visitor->trace(m_validityState);
+}
+
ValidityState* FormAssociatedElement::validity()
{
if (!m_validityState)
@@ -142,10 +148,18 @@ void FormAssociatedElement::setForm(HTMLFormElement* newForm)
if (m_form)
m_form->disassociate(*this);
if (newForm) {
+#if ENABLE(OILPAN)
+ m_form = newForm;
+#else
m_form = newForm->createWeakPtr();
+#endif
m_form->associate(*this);
} else {
+#if ENABLE(OILPAN)
+ m_form = nullptr;
+#else
m_form = WeakPtr<HTMLFormElement>();
+#endif
}
didChangeForm();
}
« no previous file with comments | « Source/core/html/FormAssociatedElement.h ('k') | Source/core/html/HTMLFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698