From 92d0a3a8926b29d4556f90a270f5c2d4632f7510 Mon Sep 17 00:00:00 2001 From: "danm%netscape.com" Date: Fri, 28 Jul 2000 03:48:26 +0000 Subject: [PATCH] shut down a selection's autoscroll timer in the selection's destructor. bug 43470. r=saari@netscape.com --- content/base/src/nsSelection.cpp | 5 ++++- layout/base/src/nsSelection.cpp | 5 ++++- layout/generic/nsSelection.cpp | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/content/base/src/nsSelection.cpp b/content/base/src/nsSelection.cpp index cb2dc482617e..8618c6a468d9 100644 --- a/content/base/src/nsSelection.cpp +++ b/content/base/src/nsSelection.cpp @@ -3110,7 +3110,10 @@ nsDOMSelection::~nsDOMSelection() } setAnchorFocusRange(-1); - NS_IF_RELEASE(mAutoScrollTimer); + if (mAutoScrollTimer) { + mAutoScrollTimer->Stop(); + NS_RELEASE(mAutoScrollTimer); + } } diff --git a/layout/base/src/nsSelection.cpp b/layout/base/src/nsSelection.cpp index cb2dc482617e..8618c6a468d9 100644 --- a/layout/base/src/nsSelection.cpp +++ b/layout/base/src/nsSelection.cpp @@ -3110,7 +3110,10 @@ nsDOMSelection::~nsDOMSelection() } setAnchorFocusRange(-1); - NS_IF_RELEASE(mAutoScrollTimer); + if (mAutoScrollTimer) { + mAutoScrollTimer->Stop(); + NS_RELEASE(mAutoScrollTimer); + } } diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp index cb2dc482617e..8618c6a468d9 100644 --- a/layout/generic/nsSelection.cpp +++ b/layout/generic/nsSelection.cpp @@ -3110,7 +3110,10 @@ nsDOMSelection::~nsDOMSelection() } setAnchorFocusRange(-1); - NS_IF_RELEASE(mAutoScrollTimer); + if (mAutoScrollTimer) { + mAutoScrollTimer->Stop(); + NS_RELEASE(mAutoScrollTimer); + } }