Marco Trevisan (Treviño) 468246bb3b gobject: Ensure an object has toggle references before notifying it
When an object with toggle reference is notifying a change we just
assume that this is true because of previous checks.
However, while locking, another thread may have removed the toggle
reference causing the waiting thread to abort (as no handler is set at
that point).

To avoid this, once we've got the toggle references mutex lock, check
again if the object has toggle reference, and if it's not the case
anymore just ignore the request.

Add a test that triggers this, it's not 100% happening because this is
of course timing related, but this is very close to the truth.

Fixes: #2394
2021-09-20 17:56:25 +02:00
..
2015-10-23 11:28:03 -04:00
2021-05-13 22:16:27 +01:00
2014-05-30 10:22:35 -04:00
2018-11-01 01:41:32 +03:00
2020-11-17 15:50:07 +00:00
2021-05-13 22:16:27 +01:00
2021-07-23 22:21:33 +02:00
2020-11-17 15:50:07 +00:00