After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749693 - GActionGroupExporter: flush queue on requests
GActionGroupExporter: flush queue on requests
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gapplication
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-05-21 18:23 UTC by Allison Karlitskaya (desrt)
Modified: 2015-06-05 18:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GActionGroupExporter: flush queue on requests (2.11 KB, patch)
2015-05-21 18:23 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2015-05-21 18:23:10 UTC
In order to maintain a logical stream of events, we need to make sure we
flush and queued change notifications before responding to any requests
for information from clients.

If we don't do this, it's possible that we emit an 'add' event that was
queued at the time of a 'DescribeAll' call _after_ the reply to that
call (which already contained the description of the new action).

In practice, this is not only logically incorrect, but it can also cause
problems.  If a change to action 'state' or 'enabled' occurs after the
DescribeAll but before the signal has been dispatched, it will be
ignored because an 'add' signal is already pending.  When that add
signal is sent, it will contain the correct data, but the receiver will
ignore it because it already saw the action in the DescribeAll reply.
Comment 1 Allison Karlitskaya (desrt) 2015-05-21 18:23:14 UTC
Created attachment 303777 [details] [review]
GActionGroupExporter: flush queue on requests
Comment 2 Lars Karlitski 2015-05-21 19:31:36 UTC
Review of attachment 303777 [details] [review]:

Yep, thanks.
Comment 3 Matthias Clasen 2015-06-05 18:26:28 UTC
Attachment 303777 [details] pushed as 865ce79 - GActionGroupExporter: flush queue on requests