[Libreoffice-commits] core.git: 2 commits - cppuhelper/source logerrit
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 11 06:44:52 UTC 2021
cppuhelper/source/weak.cxx | 9 +++++++++
logerrit | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 3d7103f18eb0a5eaf49c0acd72c7f6a3b98199ae
Author: Noel <noel.grandin at collabora.co.uk>
AuthorDate: Wed Mar 10 16:05:31 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Mar 11 07:44:16 2021 +0100
cppu:OWeakObject zombie debugging
add some logic to catch re-animating objects early
Change-Id: I42b13eaddbc227d8b0a4e786e86ced8fbb406cae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112268
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index a11e52bbbb78..06c6ed178def 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -100,6 +100,10 @@ Any SAL_CALL OWeakConnectionPoint::queryInterface( const Type & rType )
// XInterface
void SAL_CALL OWeakConnectionPoint::acquire() throw()
{
+#ifdef DBG_UTIL
+ // catch things early which have been deleted and then re-acquired
+ assert(m_aRefCount != -1);
+#endif
osl_atomic_increment( &m_aRefCount );
}
@@ -107,7 +111,12 @@ void SAL_CALL OWeakConnectionPoint::acquire() throw()
void SAL_CALL OWeakConnectionPoint::release() throw()
{
if (! osl_atomic_decrement( &m_aRefCount ))
+ {
+#ifdef DBG_UTIL
+ m_aRefCount = -1;
+#endif
delete this;
+ }
}
void OWeakConnectionPoint::dispose()
commit 3646ab583736e6d5e2b3fb4d51857b4b6b777b45
Author: Noel <noel.grandin at collabora.co.uk>
AuthorDate: Wed Mar 10 16:12:02 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Mar 11 07:44:03 2021 +0100
and fix logerrit on linux again
after I broke it with
commit 69959235c3094b811406f734e863a63fc61046c0
Date: Tue Mar 9 19:29:19 2021 +0200
adapt recent change to macOS
Change-Id: Ib58e9903839143fdf6e84a04d532f70a8212f984
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112269
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/logerrit b/logerrit
index fc30f918c17c..35a454c9267f 100755
--- a/logerrit
+++ b/logerrit
@@ -24,7 +24,7 @@ submit() {
fi
if [ "$BRANCH" = "master" ]; then
- if [ "$unamestr" = 'Linux' ]; then
+ if [[ "$(uname)" == *Linux* ]]; then
WEEKOLDDATE=$(date --date="7 days ago" +%s)
else
WEEKOLDDATE=$(date -v7d +%s) # BSD equivalent
More information about the Libreoffice-commits
mailing list