mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-07 15:57:31 +09:00
Fix crashiness of IntersectionObservers.
Mozilla hashtables -still- suck.
This commit is contained in:
parent
689d0a55cd
commit
304984a6aa
2 changed files with 25 additions and 21 deletions
|
|
@ -145,7 +145,7 @@ public:
|
|||
void Observe(Element& aTarget);
|
||||
void Unobserve(Element& aTarget);
|
||||
|
||||
bool UnlinkTarget(Element& aTarget);
|
||||
void UnlinkTarget(Element& aTarget);
|
||||
void Disconnect();
|
||||
|
||||
void TakeRecords(nsTArray<RefPtr<DOMIntersectionObserverEntry>>& aRetVal);
|
||||
|
|
@ -172,7 +172,10 @@ protected:
|
|||
RefPtr<Element> mRoot;
|
||||
nsCSSRect mRootMargin;
|
||||
nsTArray<double> mThresholds;
|
||||
nsTHashtable<nsPtrHashKey<Element>> mObservationTargets;
|
||||
|
||||
// Holds raw pointers which are explicitly cleared by UnlinkTarget().
|
||||
nsTArray<Element*> mObservationTargets;
|
||||
|
||||
nsTArray<RefPtr<DOMIntersectionObserverEntry>> mQueuedEntries;
|
||||
bool mConnected;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue