• Jan-Marek Glogowski's avatar
    Prevent out-of-order LO event processing · 5469ac13
    Jan-Marek Glogowski yazdı
    There's a callback processing loop, introduced by
    a7c84375, which releases the
    SolarMutex and is triggered by a queued user event. Such a
    scenario can easily be reproduced by any LOK client resulting in
    hitting the empty user event processing list assertion.
    I'm not sure this should be handled via LO events at all.
    
    So this - again - gets rid of the the assertion and tries to
    prevent processing the user events out-of-order.
    In the case of giving up the SolarMutex while processing a user
    event an other thread or even nested loop can "steal" the user
    event list and continue processing.
    
    Most VCL backends run the event loop just in the main process,
    so for them this scenario is guaranteed. But the headless
    backend - running without UI or from LOK - is still allowed to
    process events in any thread. This is harder to fix and probably
    should use the same solution the gtk* backends use.
    
    This also changes the dequeues into lists to use splice for
    appending them.
    
    Change-Id: Id4a93a01dea415271ad96098830f18f06d4a75b9
    Reviewed-on: https://gerrit.libreoffice.org/46550Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarHenry Castro <hcastro@collabora.com>
    Reviewed-by: 's avatarpranavk <pranavk@collabora.co.uk>
    Tested-by: 's avatarpranavk <pranavk@collabora.co.uk>
    5469ac13
salusereventlist.hxx 3.99 KB