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

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

Issue 23983034: [oilpan] Handlify Node raw pointers in html/ and subclasses of dom/LiveNodeList. (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 3 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/HTMLAllCollection.cpp
diff --git a/Source/core/html/HTMLAllCollection.cpp b/Source/core/html/HTMLAllCollection.cpp
index 2a61b07a19f860329648345769c7ac31f995ec9d..2d23c26da048a37fd38d5c4349aa6cd2459e8c92 100644
--- a/Source/core/html/HTMLAllCollection.cpp
+++ b/Source/core/html/HTMLAllCollection.cpp
@@ -30,12 +30,12 @@
namespace WebCore {
-PassRefPtr<HTMLAllCollection> HTMLAllCollection::create(Node* node, CollectionType type)
+PassRefPtr<HTMLAllCollection> HTMLAllCollection::create(const Handle<Node>& node, CollectionType type)
{
return adoptRef(new HTMLAllCollection(node, type));
}
-HTMLAllCollection::HTMLAllCollection(Node* node, CollectionType type)
+HTMLAllCollection::HTMLAllCollection(const Handle<Node>& node, CollectionType type)
: HTMLCollection(node, type, DoesNotOverrideItemAfter)
{
ScriptWrappable::init(this);
@@ -45,22 +45,22 @@ HTMLAllCollection::~HTMLAllCollection()
{
}
-Node* HTMLAllCollection::namedItemWithIndex(const AtomicString& name, unsigned index) const
+Result<Node> HTMLAllCollection::namedItemWithIndex(const AtomicString& name, unsigned index) const
{
updateNameCache();
if (CollectionRoot<Vector<Member<Element> > >* cache = idCache(name)) {
if (index < (*cache)->size())
- return (*cache)->at(index).handle().raw();
+ return (*cache)->at(index);
index -= (*cache)->size();
}
if (CollectionRoot<Vector<Member<Element> > >* cache = nameCache(name)) {
if (index < (*cache)->size())
- return (*cache)->at(index).handle().raw();
+ return (*cache)->at(index);
}
- return 0;
+ return nullptr;
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698