summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-06-30 15:23:15 +0200
committerAndras Timar <andras.timar@collabora.com>2017-07-12 10:54:15 +0200
commitdda4d454d63bc4284cbbac2b5c122c3f6450f207 (patch)
treeadc94020558772003183d6d514b5baee28475703 /accessibility
parent8c5e45e12c31f6fa1dce7d0b60a949fd185cfb6e (diff)
tdf#108838 accessibility: fix horrible memory leak in AccessibleTabBarBase
Reproducing tdf#108833 failed because applying the Master Page takes > 2 hours; the time is spent calling vcl::Window listeners, of which there were some 39525 after a couple minutes, almost all of which AccessibleTabBarBase. AccessibleTabBarBase::WindowEventListener() has an inverted condition that suppresses the event that is generated from TabBar::Clear() and thus when DrawViewShell::ResetActualPage() calls Clear() no AccessibleTabBarPage is removed but then the InsertPage() calls create duplicate objects that again register as listeners. The condition is obviously inverted given the CVS commit message: 1.2.88.1 log @#135353# do not pass VCLEVENT_TABBAR_PAGEREMOVED (all) to objects other than AccessibleTabBarPageList @ text a69 8 if( ( pWinEvent->GetId() == VCLEVENT_TABBAR_PAGEREMOVED ) && ( (sal_uInt16)(sal_IntPtr) pWinEvent->GetData() == TAB_PAGE_NOTFOUND ) && ( dynamic_cast< AccessibleTabBarPageList *> (this) != NULL ) ) { return 0; } Change-Id: I2a3b86bbd0f0251a966f41b316a3b313517df24f (cherry picked from commit b2b085441dc79fb78607dbf1969c12a40db58214) Reviewed-on: https://gerrit.libreoffice.org/39416 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 5f345e3a19bf7cad56951ed90fdf78f03a15b96a)
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/extended/accessibletabbarbase.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/accessibility/source/extended/accessibletabbarbase.cxx b/accessibility/source/extended/accessibletabbarbase.cxx
index f75d4572a789..b137da3acdd5 100644
--- a/accessibility/source/extended/accessibletabbarbase.cxx
+++ b/accessibility/source/extended/accessibletabbarbase.cxx
@@ -50,7 +50,7 @@ IMPL_LINK( AccessibleTabBarBase, WindowEventListener, VclWindowEvent&, rEvent, v
if( ( rEvent.GetId() == VCLEVENT_TABBAR_PAGEREMOVED ) &&
( (sal_uInt16)reinterpret_cast<sal_IntPtr>(rEvent.GetData()) == TabBar::PAGE_NOT_FOUND ) &&
- ( dynamic_cast< AccessibleTabBarPageList *> (this) != nullptr ) )
+ (dynamic_cast<AccessibleTabBarPageList *>(this) == nullptr))
{
return;
}