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

Unified Diff: Source/core/dom/CheckedRadioButtons.cpp

Issue 25403004: [oilpan] Figure out lifetime of remaining Node raw pointers (Part 2) (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/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();

Powered by Google App Engine
This is Rietveld 408576698