зеркало из https://github.com/mozilla/pjs.git
Bug 412882. Crash in scroll callback. r=ginn, a=schrep
This commit is contained in:
Родитель
8e9d0c5e5c
Коммит
e71b932cfe
|
@ -691,6 +691,7 @@ nsresult nsDocAccessible::RemoveEventListeners()
|
|||
if (mScrollWatchTimer) {
|
||||
mScrollWatchTimer->Cancel();
|
||||
mScrollWatchTimer = nsnull;
|
||||
NS_RELEASE_THIS(); // Kung fu death grip
|
||||
}
|
||||
|
||||
nsRefPtr<nsRootAccessible> rootAccessible(GetRootAccessible());
|
||||
|
@ -827,6 +828,7 @@ void nsDocAccessible::ScrollTimerCallback(nsITimer *aTimer, void *aClosure)
|
|||
if (docAcc->mScrollWatchTimer) {
|
||||
docAcc->mScrollWatchTimer->Cancel();
|
||||
docAcc->mScrollWatchTimer = nsnull;
|
||||
NS_RELEASE(docAcc); // Release kung fu death grip
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -879,6 +881,7 @@ NS_IMETHODIMP nsDocAccessible::ScrollPositionDidChange(nsIScrollableView *aScrol
|
|||
else {
|
||||
mScrollWatchTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
if (mScrollWatchTimer) {
|
||||
NS_ADDREF_THIS(); // Kung fu death grip
|
||||
mScrollWatchTimer->InitWithFuncCallback(ScrollTimerCallback, this,
|
||||
kScrollPosCheckWait,
|
||||
nsITimer::TYPE_REPEATING_SLACK);
|
||||
|
|
Загрузка…
Ссылка в новой задаче