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. |