diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-12-22 02:15:50 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-12-22 02:15:50 +0100 |
commit | c9d920e9c630fd8b99b863e034742fd3b38e12d3 (patch) | |
tree | a2f3f8a11aa10bca612c9648b9219abc89d73e5a /dom/base/Element.cpp | |
parent | ba81aaf073bbf9b2e832324d1710faa4c61799ba (diff) | |
download | UXP-c9d920e9c630fd8b99b863e034742fd3b38e12d3.tar UXP-c9d920e9c630fd8b99b863e034742fd3b38e12d3.tar.gz UXP-c9d920e9c630fd8b99b863e034742fd3b38e12d3.tar.lz UXP-c9d920e9c630fd8b99b863e034742fd3b38e12d3.tar.xz UXP-c9d920e9c630fd8b99b863e034742fd3b38e12d3.zip |
Revise lifetime management of IntersectionObservers.
Tag #249
Diffstat (limited to 'dom/base/Element.cpp')
-rw-r--r-- | dom/base/Element.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index 3760dc43f..67759fdb2 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -3947,7 +3947,7 @@ Element::ClearDataset() slots->mDataset = nullptr; } -nsDataHashtable<nsPtrHashKey<DOMIntersectionObserver>, int32_t>* +nsDataHashtable<nsRefPtrHashKey<DOMIntersectionObserver>, int32_t>* Element::RegisteredIntersectionObservers() { nsDOMSlots* slots = DOMSlots(); @@ -3962,7 +3962,7 @@ enum nsPreviousIntersectionThreshold { void Element::RegisterIntersectionObserver(DOMIntersectionObserver* aObserver) { - nsDataHashtable<nsPtrHashKey<DOMIntersectionObserver>, int32_t>* observers = + nsDataHashtable<nsRefPtrHashKey<DOMIntersectionObserver>, int32_t>* observers = RegisteredIntersectionObservers(); if (observers->Contains(aObserver)) { return; @@ -3979,7 +3979,7 @@ Element::RegisterIntersectionObserver(DOMIntersectionObserver* aObserver) void Element::UnregisterIntersectionObserver(DOMIntersectionObserver* aObserver) { - nsDataHashtable<nsPtrHashKey<DOMIntersectionObserver>, int32_t>* observers = + nsDataHashtable<nsRefPtrHashKey<DOMIntersectionObserver>, int32_t>* observers = RegisteredIntersectionObservers(); observers->Remove(aObserver); } @@ -3987,7 +3987,7 @@ Element::UnregisterIntersectionObserver(DOMIntersectionObserver* aObserver) bool Element::UpdateIntersectionObservation(DOMIntersectionObserver* aObserver, int32_t aThreshold) { - nsDataHashtable<nsPtrHashKey<DOMIntersectionObserver>, int32_t>* observers = + nsDataHashtable<nsRefPtrHashKey<DOMIntersectionObserver>, int32_t>* observers = RegisteredIntersectionObservers(); if (!observers->Contains(aObserver)) { return false; |