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

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

Issue 262093006: Oilpan: Make the Node hierarchy RefCountedGarbageCollected instead of TreeShared. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another build fix. 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/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 1f2d119823d86ba37185787bd4fa7ada6e0b2b74..4e375f2bee097c38f1d08cd06cbdf73608a8055a 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -82,7 +82,7 @@ namespace WebCore {
using namespace HTMLNames;
-class ListAttributeTargetObserver : IdTargetObserver {
+class ListAttributeTargetObserver : public IdTargetObserver {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<ListAttributeTargetObserver> create(const AtomicString& id, HTMLInputElement*);
@@ -1499,12 +1499,19 @@ bool HTMLInputElement::hasValidDataListOptions() const
return false;
}
+void HTMLInputElement::setListAttributeTargetObserver(PassOwnPtr<ListAttributeTargetObserver> newObserver)
+{
+ if (m_listAttributeTargetObserver)
+ m_listAttributeTargetObserver->unregister();
+ m_listAttributeTargetObserver = newObserver;
+}
+
void HTMLInputElement::resetListAttributeTargetObserver()
{
if (inDocument())
- m_listAttributeTargetObserver = ListAttributeTargetObserver::create(fastGetAttribute(listAttr), this);
+ setListAttributeTargetObserver(ListAttributeTargetObserver::create(fastGetAttribute(listAttr), this));
else
- m_listAttributeTargetObserver = nullptr;
+ setListAttributeTargetObserver(nullptr);
}
void HTMLInputElement::listAttributeTargetChanged()

Powered by Google App Engine
This is Rietveld 408576698