Index: Source/core/dom/CheckedRadioButtons.cpp |
diff --git a/Source/core/dom/CheckedRadioButtons.cpp b/Source/core/dom/CheckedRadioButtons.cpp |
index 7ff759922712b5d8cbd88b95fa5c17322029ce3a..efca9ecd80cdf79daff5b2da1d541a67d8b40aa1 100644 |
--- a/Source/core/dom/CheckedRadioButtons.cpp |
+++ b/Source/core/dom/CheckedRadioButtons.cpp |
@@ -32,7 +32,7 @@ public: |
static PassOwnPtr<RadioButtonGroup> create(); |
bool isEmpty() const { return m_members.isEmpty(); } |
bool isRequired() const { return m_requiredCount; } |
- Result<HTMLInputElement> checkedButton() const { return Handle<HTMLInputElement>(m_checkedButton); } // FIXME(oilpan): Remove Handle<>(). |
+ Result<HTMLInputElement> checkedButton() const { return adoptRawResult(m_checkedButton); } |
void add(const Handle<HTMLInputElement>&); |
void updateCheckedState(const Handle<HTMLInputElement>&); |
void requiredAttributeChanged(const Handle<HTMLInputElement>&); |
@@ -45,8 +45,9 @@ private: |
bool isValid() const; |
void setCheckedButton(const Handle<HTMLInputElement>&); |
- // FIXME(oilpan): Move RadioButtonGroup to the heap and use Members. |
+ // FIXME(oilpan): This should be a weak hash set. |
Mads Ager (chromium)
2013/10/01 10:14:55
I don't think should be weak. These should be stro
haraken
2013/10/01 16:46:52
Right. Fixed.
|
HashSet<HTMLInputElement*> m_members; |
+ // FIXME(oilpan): This should be a weak pointer. |
HTMLInputElement* m_checkedButton; |
zerny-chromium
2013/10/01 10:18:37
Why should these be weak pointers?
haraken
2013/10/01 16:46:52
Right. This should be a strong pointer. Thanks.
|
size_t m_requiredCount; |
}; |
@@ -69,7 +70,7 @@ inline bool RadioButtonGroup::isValid() const |
void RadioButtonGroup::setCheckedButton(const Handle<HTMLInputElement>& button) |
{ |
- Handle<HTMLInputElement> oldCheckedButton = Handle<HTMLInputElement>(m_checkedButton); // FIXME(oilpan): Remove Handle<>(). |
+ Handle<HTMLInputElement> oldCheckedButton = adoptRawResult(m_checkedButton); |
if (oldCheckedButton == button) |
return; |
m_checkedButton = button.raw(); |