diff options
author | Arnaud Versini <Arnaud.Versini@libreoffice.org> | 2017-11-19 19:23:10 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-27 13:02:09 +0100 |
commit | 2877aa089d9185ff25dbe8f9920611277750d5c8 (patch) | |
tree | 3de5aa971fc73b72fa637e7e1bbcd69b0cc92423 /accessibility | |
parent | 944cc09cf76cea46d9f6bd7be14c64f74fe64403 (diff) |
accessibility : AccessibleBrowseBoxBase::isAlive is not thread safe
Change-Id: I243328a662bf37944e1fa718f63a0e509250db15
Reviewed-on: https://gerrit.libreoffice.org/44930
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility')
6 files changed, 13 insertions, 0 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx index 1467c8335a4a..904e0846d8e2 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx @@ -175,6 +175,7 @@ OUString SAL_CALL AccessibleBrowseBoxBase::getAccessibleName() Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL AccessibleBrowseBoxBase::getAccessibleRelationSet() { + ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); // BrowseBox does not have relations. return new utl::AccessibleRelationSetHelper; @@ -433,6 +434,7 @@ void AccessibleBrowseBoxBase::commitEvent( sal_Int16 SAL_CALL AccessibleBrowseBoxBase::getAccessibleRole() { + osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); sal_Int16 nRole = AccessibleRole::UNKNOWN; switch ( meObjType ) @@ -525,6 +527,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( BrowseBoxAccessibleElement, AccessibleBrowseBo Reference< css::accessibility::XAccessibleContext > SAL_CALL BrowseBoxAccessibleElement::getAccessibleContext() { + osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return this; } diff --git a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx index d23340a2a07f..762728a934b3 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx @@ -46,6 +46,7 @@ namespace accessibility Reference< XAccessibleContext > SAL_CALL AccessibleCheckBoxCell::getAccessibleContext( ) { + osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return this; } diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx index 72a4c2d3397b..4497a93f496a 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx @@ -86,6 +86,8 @@ AccessibleBrowseBoxHeaderBar::getAccessibleAtPoint( const awt::Point& rPoint ) void SAL_CALL AccessibleBrowseBoxHeaderBar::grabFocus() { + SolarMethodGuard aGuard(getMutex()); + ensureIsAlive(); // focus on header not supported } @@ -112,12 +114,16 @@ OUString SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleColumnDescription( Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleRowHeaders() { + SolarMethodGuard aGuard(getMutex()); + ensureIsAlive(); return nullptr; // no headers in headers } Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleColumnHeaders() { + SolarMethodGuard aGuard(getMutex()); + ensureIsAlive(); return nullptr; // no headers in headers } diff --git a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx index 08d2ce5fe4fe..40ce9340127d 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx @@ -60,6 +60,7 @@ AccessibleBrowseBoxTable::getAccessibleChild( sal_Int32 nChildIndex ) sal_Int32 SAL_CALL AccessibleBrowseBoxTable::getAccessibleIndexInParent() { + osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return BBINDEX_TABLE; } diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx index 692d45e70750..160abb9f138b 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx @@ -61,6 +61,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleChildCount() sal_Int16 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleRole() { + osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return AccessibleRole::TABLE; } diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx index 69f163e05393..b267baf51163 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx @@ -197,6 +197,7 @@ namespace accessibility /** @return The XAccessibleContext interface of this object. */ Reference< XAccessibleContext > SAL_CALL AccessibleBrowseBoxTableCell::getAccessibleContext() { + osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); return this; } |