GSettings Registry Backend: Init cache_lock Earlier
authorChun-wei Fan <fanchunwei@src.gnome.org>
Thu, 20 Nov 2014 10:34:21 +0000 (18:34 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Thu, 20 Nov 2014 14:11:25 +0000 (22:11 +0800)
commitf6bbd19beb41aeb52426ba96b3c39c1b09f6bc17
tree08ee4d588cad0966908ee14a32d3f52810844296
parent5c68fc9f93ee3d3cdb94cda2be5565584dfbb908
GSettings Registry Backend: Init cache_lock Earlier

In commit 8ff5668, we are subscribing the GSettings backend later, but this
meant that we need to initialize cache_lock earlier, as we might try to
use that lock before a change notification is issued to subscribe the
backend, which would then cause an access violation if we are trying to
read GSettings values, as that lock is used to access the Windows Registry.

Initialize cache_lock once we initialize the GSettings Registry backend,
and delete it upon finalize, so that g_settings_read_from_backend() can
proceed normally, even if the GSettings backend is not yet subscribed.

https://bugzilla.gnome.org/show_bug.cgi?id=740413
gio/gregistrysettingsbackend.c