summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-11-28 21:32:15 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-11-30 16:03:58 +0100
commite3fe8d03bcd5e4369f84bff848fe12cb3117acc4 (patch)
tree3d0fd2f5f41e85848bc614dbd17dad1a5cddf7e4 /include
parent6417d9a3b79346da4e1d08994436a0a17849cd8a (diff)
OInterfaceContainerHelper3 needs to be thread-safe
Change-Id: I11b84917033073d29268e61175faf43cbd5b1168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125986 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 17aa192818caeb9af1381051a2dfda9568f7ce07) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125996 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/interfacecontainer3.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/comphelper/interfacecontainer3.hxx b/include/comphelper/interfacecontainer3.hxx
index 56cbeca61433..a9298a69e76d 100644
--- a/include/comphelper/interfacecontainer3.hxx
+++ b/include/comphelper/interfacecontainer3.hxx
@@ -85,7 +85,9 @@ public:
private:
OInterfaceContainerHelper3<ListenerT>& rCont;
- o3tl::cow_wrapper<std::vector<css::uno::Reference<ListenerT>>> maData;
+ o3tl::cow_wrapper<std::vector<css::uno::Reference<ListenerT>>,
+ o3tl::ThreadSafeRefCountingPolicy>
+ maData;
sal_Int32 nRemain;
OInterfaceIteratorHelper3(const OInterfaceIteratorHelper3&) = delete;
@@ -209,7 +211,9 @@ public:
private:
friend class OInterfaceIteratorHelper3<ListenerT>;
- o3tl::cow_wrapper<std::vector<css::uno::Reference<ListenerT>>> maData;
+ o3tl::cow_wrapper<std::vector<css::uno::Reference<ListenerT>>,
+ o3tl::ThreadSafeRefCountingPolicy>
+ maData;
::osl::Mutex& rMutex;
OInterfaceContainerHelper3(const OInterfaceContainerHelper3&) = delete;
OInterfaceContainerHelper3& operator=(const OInterfaceContainerHelper3&) = delete;