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

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

Issue 280123002: Oilpan: move LiveNodeList collections to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have NodeRareData clear out NodeListsNodeData instead. 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/HTMLFormControlsCollection.h ('k') | Source/core/html/HTMLFormElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormControlsCollection.cpp
diff --git a/Source/core/html/HTMLFormControlsCollection.cpp b/Source/core/html/HTMLFormControlsCollection.cpp
index 19c5961f7045f5695f7a75a02e8fc8a505bd66ab..3175f58bac0b345568b804a87b86d6316844b314 100644
--- a/Source/core/html/HTMLFormControlsCollection.cpp
+++ b/Source/core/html/HTMLFormControlsCollection.cpp
@@ -47,9 +47,9 @@ HTMLFormControlsCollection::HTMLFormControlsCollection(ContainerNode& ownerNode)
ScriptWrappable::init(this);
}
-PassRefPtr<HTMLFormControlsCollection> HTMLFormControlsCollection::create(ContainerNode& ownerNode, CollectionType)
+PassRefPtrWillBeRawPtr<HTMLFormControlsCollection> HTMLFormControlsCollection::create(ContainerNode& ownerNode, CollectionType)
{
- return adoptRef(new HTMLFormControlsCollection(ownerNode));
+ return adoptRefWillBeNoop(new HTMLFormControlsCollection(ownerNode));
}
HTMLFormControlsCollection::~HTMLFormControlsCollection()
@@ -153,7 +153,7 @@ void HTMLFormControlsCollection::updateIdNameCache() const
if (hasValidIdNameCache())
return;
- OwnPtr<NamedItemCache> cache = NamedItemCache::create();
+ OwnPtrWillBeRawPtr<NamedItemCache> cache = NamedItemCache::create();
HashSet<StringImpl*> foundInputElements;
const FormAssociatedElement::List& elementsArray = formControlElements();
@@ -192,9 +192,9 @@ void HTMLFormControlsCollection::updateIdNameCache() const
setNamedItemCache(cache.release());
}
-void HTMLFormControlsCollection::namedGetter(const AtomicString& name, bool& radioNodeListEnabled, RefPtr<RadioNodeList>& radioNodeList, bool& elementEnabled, RefPtr<Element>& element)
+void HTMLFormControlsCollection::namedGetter(const AtomicString& name, bool& radioNodeListEnabled, RefPtrWillBeRawPtr<RadioNodeList>& radioNodeList, bool& elementEnabled, RefPtr<Element>& element)
{
- Vector<RefPtr<Element> > namedItems;
+ WillBeHeapVector<RefPtrWillBeMember<Element> > namedItems;
this->namedItems(name, namedItems);
if (namedItems.isEmpty())
@@ -202,7 +202,8 @@ void HTMLFormControlsCollection::namedGetter(const AtomicString& name, bool& rad
if (namedItems.size() == 1) {
elementEnabled = true;
- element = namedItems.first();
+ // FIXME: Oilpan: remove the call to |get| when Element becomes [GarbageCollected].
+ element = namedItems.at(0).get();
return;
}
« no previous file with comments | « Source/core/html/HTMLFormControlsCollection.h ('k') | Source/core/html/HTMLFormElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698