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

Unified Diff: Source/core/html/HTMLSelectElement.h

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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/HTMLOutputElement.cpp ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLSelectElement.h
diff --git a/Source/core/html/HTMLSelectElement.h b/Source/core/html/HTMLSelectElement.h
index 39a5cc3c80382cda3be13781fe874dd1786f05f0..150dfa1c6439bfb5e1eb0c9c1efc501948290b23 100644
--- a/Source/core/html/HTMLSelectElement.h
+++ b/Source/core/html/HTMLSelectElement.h
@@ -38,7 +38,7 @@ class HTMLOptionElement;
class HTMLSelectElement : public HTMLFormControlElementWithState, public TypeAheadDataSource {
public:
- static PassRefPtr<HTMLSelectElement> create(const QualifiedName&, Document*, HTMLFormElement*);
+ static Result<HTMLSelectElement> create(const QualifiedName&, Document*, HTMLFormElement*);
int selectedIndex() const;
void setSelectedIndex(int);
@@ -105,6 +105,8 @@ public:
// For use in the implementation of HTMLOptionElement.
void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected);
+ virtual void acceptHeapVisitor(Visitor*) const OVERRIDE;
+
protected:
HTMLSelectElement(const QualifiedName&, Document*, HTMLFormElement*);
@@ -207,16 +209,16 @@ inline bool isHTMLSelectElement(const Node* node)
return node->hasTagName(HTMLNames::selectTag);
}
-inline HTMLSelectElement* toHTMLSelectElement(Node* node)
+inline Result<HTMLSelectElement> toHTMLSelectElement(Node* node)
{
ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLSelectElement(node));
- return static_cast<HTMLSelectElement*>(node);
+ return Handle<HTMLSelectElement>(static_cast<HTMLSelectElement*>(node));
}
-inline const HTMLSelectElement* toHTMLSelectElement(const Node* node)
+inline Result<const HTMLSelectElement> toHTMLSelectElement(const Node* node)
{
ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLSelectElement(node));
- return static_cast<const HTMLSelectElement*>(node);
+ return Handle<const HTMLSelectElement>(static_cast<const HTMLSelectElement*>(node));
}
void toHTMLSelectElement(const HTMLSelectElement*); // This overload will catch anyone doing an unnecessary cast.
« no previous file with comments | « Source/core/html/HTMLOutputElement.cpp ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698