printoperation: add some assertions
authorMichael Catanzaro <mcatanzaro@redhat.com>
Wed, 27 Sep 2023 00:25:41 +0000 (19:25 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 28 Sep 2023 00:42:45 +0000 (20:42 -0400)
commitcbfbaef4cbfcb8f5caa2f4c10a5eb7b18b0ed15d
tree67ec52c382fa96bf9633fa4524ba89a8d3418e43
parent39560c0914d0fc5ffcb026bff13926c94d05e341
printoperation: add some assertions

Let's assert that we schedule the idle callback exactly once.

These assertions are not perfect because if the callback executes before
we schedule it, then the assertion itself would be a use-after-free,
since I'm using the PrinterFinder to track whether the callback that
frees it has been scheduled. But in practice when using loupe's print
dialog, I was noticing the callback scheduled twice before it was
executed. The assertion would have caught this problem.
gtk/print/gtkprintoperation-unix.c