summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-13 12:37:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-13 13:04:34 +0000
commit872cf486c542ae66bbf65e0270a642f4019df678 (patch)
treebfdb76b2cd07327895888efb0aa4834916714dcc /vcl
parentb252dbf59dc1466a2ef45e9905334718e587e5c9 (diff)
Revert "verify SolarMutex when ref-counting VclPtr" series
This reverts the following commits: commit 722f4e1d86710f2facd37d7e040df9e1fd585e26 tdf#104573 - Assertion failed: SolarMutex not locked commit f04ec99f5e6a543b8191ced61db4710c3c0de356 tdf#104573 - Assertion failed: SolarMutex not locked commit 71b1e3ff6374c23e65200d3bcafca387d29af04f tdf#104573 - Assertion failed: SolarMutex not locked when trying commit e794ce1eef6730e5a46d5fb0aa6db2895ede85e7 verify that we hold the SolarMutex when ref-counting VclPtr IRC discussion: <noelgrandin> sberg, maybe I should revert this whole "VclPtr assert" series, I don't have mental bandwidth to sort this out properly now <sberg> noelgrandin, what I fear is that you'll end up adding lots of SolarMutex locks to small places, where the proper fix would be to add it further out; and once such a dreaded recursive SolarMutex lock is in place (but needlessly so, once the proper fix is done), it's hard to clean that up again <noelgrandin> sberg, yeah, in that case I'll just remove all of this, leave it for another day Change-Id: Ie4f84b72b79a1b7e80164b5c7693af398c2c569a Reviewed-on: https://gerrit.libreoffice.org/31946 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/vclevent.cxx12
-rw-r--r--vcl/source/window/event.cxx7
-rw-r--r--vcl/source/window/menu.cxx16
-rw-r--r--vcl/source/window/mouse.cxx3
4 files changed, 6 insertions, 32 deletions
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index 4fec056aeb00..2cab94c4561e 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -92,17 +92,11 @@ VclWindowEvent::VclWindowEvent( vcl::Window* pWin, VclEventId n, void* pDat ) :
VclWindowEvent::~VclWindowEvent() {}
VclMenuEvent::VclMenuEvent( Menu* pM, VclEventId n, sal_uInt16 nPos )
- : VclSimpleEvent(n), mnPos(nPos)
-{
- SolarMutexGuard aGuard;
- pMenu = pM;
-}
+ : VclSimpleEvent(n), pMenu(pM), mnPos(nPos)
+{}
VclMenuEvent::~VclMenuEvent()
-{
- SolarMutexGuard aGuard;
- pMenu.clear();
-}
+{}
Menu* VclMenuEvent::GetMenu() const
{
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 8feb212cc1b8..e8bb662355ed 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -652,16 +652,9 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow,
NotifyEvent::NotifyEvent( MouseNotifyEvent nEventType, vcl::Window* pWindow,
const void* pEvent )
{
- SolarMutexGuard aVclGuard;
mpWindow = pWindow;
mpData = const_cast<void*>(pEvent);
mnEventType = nEventType;
}
-NotifyEvent::~NotifyEvent()
-{
- SolarMutexGuard aVclGuard;
- mpWindow.clear();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 90bd8af3b1a2..00b931e32ba9 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1407,7 +1407,6 @@ void Menu::ImplAddDel( ImplMenuDelData& rDel )
SAL_WARN_IF( rDel.mpMenu, "vcl", "Menu::ImplAddDel(): cannot add ImplMenuDelData twice !" );
if( !rDel.mpMenu )
{
- SolarMutexGuard aGuard;
rDel.mpMenu = this;
rDel.mpNext = mpFirstDel;
mpFirstDel = &rDel;
@@ -1416,10 +1415,7 @@ void Menu::ImplAddDel( ImplMenuDelData& rDel )
void Menu::ImplRemoveDel( ImplMenuDelData& rDel )
{
- {
- SolarMutexGuard aGuard;
- rDel.mpMenu = nullptr;
- }
+ rDel.mpMenu = nullptr;
if ( mpFirstDel == &rDel )
{
mpFirstDel = rDel.mpNext;
@@ -2605,10 +2601,7 @@ bool Menu::HandleMenuActivateEvent( Menu *pMenu ) const
{
ImplMenuDelData aDelData( this );
- {
- SolarMutexGuard aGuard;
- pMenu->pStartedFrom = const_cast<Menu*>(this);
- }
+ pMenu->pStartedFrom = const_cast<Menu*>(this);
pMenu->bInCallback = true;
pMenu->Activate();
@@ -2624,10 +2617,7 @@ bool Menu::HandleMenuDeActivateEvent( Menu *pMenu ) const
{
ImplMenuDelData aDelData( this );
- {
- SolarMutexGuard aGuard;
- pMenu->pStartedFrom = const_cast<Menu*>(this);
- }
+ pMenu->pStartedFrom = const_cast<Menu*>(this);
pMenu->bInCallback = true;
pMenu->Deactivate();
if( !aDelData.isDeleted() )
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index b769a8356778..d1cc051721bc 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -161,10 +161,7 @@ void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged )
void Window::ImplGenerateMouseMove()
{
if ( !mpWindowImpl->mpFrameData->mnMouseMoveId )
- {
- SolarMutexGuard aVclGuard;
mpWindowImpl->mpFrameData->mnMouseMoveId = Application::PostUserEvent( LINK( mpWindowImpl->mpFrameWindow, Window, ImplGenerateMouseMoveHdl ), nullptr, true );
- }
}
IMPL_LINK_NOARG(Window, ImplGenerateMouseMoveHdl, void*, void)