Check presence GSettingsSchema keys before getting them
The Glib documentation [1] states that "It is a programmer error to give a key that isn't specified as having a string type in the schema for settings." Therefore, we must check if the settings schema has the key before actually getting any settings. If we do not do this, glib will terminate chrome with this error message: GLib-GIO-ERROR **: Settings schema 'org.cinnamon.muffin' does not contain a key named 'button-layout' Also increase the glib requirement to 2.40 since that's the minimum version that provides g_settings_schema_has_key. This version is available on all supported distros all the way back to Ubuntu Trusty. [1] https://developer.gnome.org/gio/stable/GSettings.html#g-settings-get-string BUG=1017974 R=thestig Change-Id: I46f95bd7a242e48e1d9dc910f6b1f3ed114e7d9d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880567 Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Reviewed-by:Lei Zhang <thestig@chromium.org> Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#710152}
Showing
Please register or sign in to comment