summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2021-04-29 11:07:18 +0300
committerTor Lillqvist <tml@collabora.com>2021-04-29 22:12:40 +0200
commit76451767b9c6bb90704265d109fc32c861a3c7cd (patch)
tree1be037b494ee85cce9b093f8075d46735f6ecf7a /comphelper
parent43075227198e2aef027446611b6cbe9dfec895cb (diff)
Add SAL_WARN in case ProfileZones are overlapping and not hierarchical
Change-Id: Id09904db762b6d931ab23cce16e55d5213079516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114851 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/qa/unit/test_traceevent.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx
index e170e8aaeb18..29094b14f01b 100644
--- a/comphelper/qa/unit/test_traceevent.cxx
+++ b/comphelper/qa/unit/test_traceevent.cxx
@@ -122,6 +122,13 @@ void trace_event_test()
// object that has already had its 'e' event generated.
}
+ // This incorrect use of overlapping (not nested) ProfileZones
+ // will generate a SAL_WARN but should not crash
+ auto p1 = new comphelper::ProfileZone("error1");
+ auto p2 = new comphelper::ProfileZone("error2");
+ delete p1;
+ delete p2;
+
// Nothing is generated from this
pAsync7Locked.reset();
}