mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Make HTMLOptionsCollection::mSelect into a strong reference.
The cycle collector makes weak references like this obsolete.
This commit is contained in:
parent
27d88fc505
commit
a3386fbe38
4 changed files with 8 additions and 59 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
@ -112,11 +112,6 @@ public:
|
|||
mElements.AppendElement(aOption);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue