Revise lifetime management of IntersectionObservers.

Tag #249
This commit is contained in:
wolfbeast 2018-12-22 02:15:50 +01:00 • committed by Roy Tam
commit 42d9f2ffb3
8 changed files with 46 additions and 26 deletions

View file

@ -1341,8 +1341,9 @@ protected:
// Array of observers
nsTObserverArray<nsIDocumentObserver*> mObservers;
// Array of intersection observers
nsTArray<RefPtr<mozilla::dom::DOMIntersectionObserver>> mIntersectionObservers;
// Hashtable of intersection observers
nsTHashtable<nsPtrHashKey<mozilla::dom::DOMIntersectionObserver>>
mIntersectionObservers;
// Tracker for animations that are waiting to start.
// nullptr until GetOrCreatePendingAnimationTracker is called.