diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-30 15:50:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-30 15:50:44 +0200 |
commit | 8c0ee3ba2db18ba759a5be502a89d31f3288d32e (patch) | |
tree | bf30e99ecab54acba00426bf664a1726ea8db70f /odb/relational/source.cxx | |
parent | 9d290dc880bd27a231de9c02c62e25369dc452a4 (diff) |
Assert that statements are not already locked in top-level calls
This can be violated with crafty callbacks.
Diffstat (limited to 'odb/relational/source.cxx')
-rw-r--r-- | odb/relational/source.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/odb/relational/source.cxx b/odb/relational/source.cxx index e9ddd77..a20406a 100644 --- a/odb/relational/source.cxx +++ b/odb/relational/source.cxx @@ -3127,6 +3127,7 @@ traverse_object (type& c) // os << endl << "statements_type::auto_lock l (" << rsts << ");" + << "assert (l.locked ()) /* Must be a top-level call. */;" << endl; os << "if (!find_ (sts, &id" << @@ -3233,6 +3234,7 @@ traverse_object (type& c) // os << endl << "statements_type::auto_lock l (" << rsts << ");" + << "assert (l.locked ()) /* Must be a top-level call. */;" << endl; os << "const id_type& id (object_traits_impl::id (obj));" |