summaryrefslogtreecommitdiff
path: root/dom/base/DOMIntersectionObserver.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/DOMIntersectionObserver.h')
-rw-r--r--dom/base/DOMIntersectionObserver.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/dom/base/DOMIntersectionObserver.h b/dom/base/DOMIntersectionObserver.h
index 414f214826..8674fe25d5 100644
--- a/dom/base/DOMIntersectionObserver.h
+++ b/dom/base/DOMIntersectionObserver.h
@@ -109,7 +109,9 @@ protected:
class DOMIntersectionObserver final : public nsISupports,
public nsWrapperCache
{
- virtual ~DOMIntersectionObserver() { }
+ virtual ~DOMIntersectionObserver() {
+ Disconnect();
+ }
public:
DOMIntersectionObserver(already_AddRefed<nsPIDOMWindowInner>&& aOwner,