diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-08 13:55:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-08 17:26:41 +0000 |
commit | e794ce1eef6730e5a46d5fb0aa6db2895ede85e7 (patch) | |
tree | 3aa26bd9ba4e6bd072761a22178e20a5d80d7627 /include | |
parent | cee552d2071601b6f4131eda9e9a0a17768ea272 (diff) |
verify that we hold the SolarMutex when ref-counting VclPtr
Change-Id: If0c5a8c99f0f853c9ecad0f1a4a7299d69805b34
Reviewed-on: https://gerrit.libreoffice.org/31755
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/vclreferencebase.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/vcl/vclreferencebase.hxx b/include/vcl/vclreferencebase.hxx index 7713d9318d39..dbd3bc9ae1ae 100644 --- a/include/vcl/vclreferencebase.hxx +++ b/include/vcl/vclreferencebase.hxx @@ -21,6 +21,7 @@ #include <vcl/dllapi.h> #include <vcl/vclptr.hxx> +#include <tools/debug.hxx> #include <cassert> class VclReferenceBase; @@ -35,12 +36,14 @@ class VCL_DLLPUBLIC VclReferenceBase public: inline void acquire() const { + DBG_TESTSOLARMUTEX(); assert(mnRefCnt>0); mnRefCnt++; } inline void release() const { + DBG_TESTSOLARMUTEX(); assert(mnRefCnt>0); if (!--mnRefCnt) delete this; |