summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLOptionsCollection.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-12-14 15:08:52 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-12-14 15:08:52 +0100
commit023af95abeb4a9bd61665f37fc8dec173e0f2f4a (patch)
tree11b1facff61ff5083824158bf48cfc635a86e416 /dom/html/HTMLOptionsCollection.h
parentfea96b4527a2db6cd97c9053d647478b347d3853 (diff)
downloadUXP-023af95abeb4a9bd61665f37fc8dec173e0f2f4a.tar
UXP-023af95abeb4a9bd61665f37fc8dec173e0f2f4a.tar.gz
UXP-023af95abeb4a9bd61665f37fc8dec173e0f2f4a.tar.lz
UXP-023af95abeb4a9bd61665f37fc8dec173e0f2f4a.tar.xz
UXP-023af95abeb4a9bd61665f37fc8dec173e0f2f4a.zip
Make HTMLOptionsCollection::mSelect into a strong reference.
The cycle collector makes weak references like this obsolete.
Diffstat (limited to 'dom/html/HTMLOptionsCollection.h')
-rw-r--r--dom/html/HTMLOptionsCollection.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/dom/html/HTMLOptionsCollection.h b/dom/html/HTMLOptionsCollection.h
index 21123b3d2..496919555 100644
--- a/dom/html/HTMLOptionsCollection.h
+++ b/dom/html/HTMLOptionsCollection.h
@@ -46,7 +46,7 @@ public:
using nsWrapperCache::GetWrapper;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
protected:
- virtual ~HTMLOptionsCollection();
+ virtual ~HTMLOptionsCollection() = default;
virtual JSObject* GetWrapperPreserveColorInternal() override
{
@@ -113,11 +113,6 @@ public:
}
/**
- * Drop the reference to the select. Called during select destruction.
- */
- void DropReference();
-
- /**
* Finds the index of a given option element.
* If the option isn't part of the collection, return NS_ERROR_FAILURE
* without setting aIndex.
@@ -161,7 +156,7 @@ private:
* various members such as InsertOptionAt are also infallible. */
nsTArray<RefPtr<mozilla::dom::HTMLOptionElement> > mElements;
/** The select element that contains this array */
- HTMLSelectElement* mSelect;
+ RefPtr<HTMLSelectElement> mSelect;
};
} // namespace dom