1. 16 Jul, 2019 1 commit
  2. 15 Jul, 2019 4 commits
    • Matthew Leeds's avatar
      gio: Fix minor docs mistakes · ce9ea30b
      Matthew Leeds authored
      ce9ea30b
    • Matthias Clasen's avatar
      settings: Tweak priorities for keyfile backend · addb8c15
      Matthias Clasen authored
      We want to use the keyfile backend in sandboxes,
      but we want to avoid people losing their existing
      settings that are stored in dconf. Flatpak does
      a migration from dconf to keyfile, but only if
      the app explictly requests it.
      
      From an app perspective, there are two steps to
      the dconf->keyfile migration:
      1. Request that flatpak do the migration, by adding
         the migrate-path key to the metadata
      2. Stop adding the 'dconf hole' to the sandbox
      
      To keep us from switching to the keyfile backend
      prematurely, look at whether the app has stopped
      requesting a 'dconf hole' in the sandbox.
      addb8c15
    • Matthias Clasen's avatar
      portal: Add a getter for dconf access · 9c5d3a60
      Matthias Clasen authored
      Add method to find whether the sandbox provides
      access to dconf. This will be used to tweak
      the priorities for the keyfile settings backend.
      9c5d3a60
    • DDoSolitary's avatar
      Fix test failures for static builds · 2718245d
      DDoSolitary authored
      The plugin modules in these tests get statically linked with a separate
      copy of GLib so they end up calling vfuncs in their own copy of GLib.
      
      Fixes #1648
      2718245d
  3. 13 Jul, 2019 1 commit
  4. 11 Jul, 2019 1 commit
    • Chun-wei Fan's avatar
      meson: Mostly assume clang-cl is MSVC · e8d471f3
      Chun-wei Fan authored
      We need to enable building the dirent and gnulib sources for clang-cl,
      as we are still using the Microsoft-style headers and lib's and CRT.
      We need to also do this for the following, for similar reasoning:
      
      -Symbol export (via __declspec(dllexport))
      -Dependency discovery without pkg-config files
      -long long and ssize_t detection
      
      We do, however, enable the autoptr tests for clang-cl builds.  Note that
      at this point real MSVC builds are still better supported than clang-cl
      builds, and it will likely remain so for at least the near future,
      alhtough real MSVC builds of the GTK stack are consumable and are usable
      by clang-cl.
      e8d471f3
  5. 10 Jul, 2019 4 commits
  6. 08 Jul, 2019 2 commits
  7. 04 Jul, 2019 5 commits
    • David Strauss's avatar
      Fix typo in request handle · 979c92df
      David Strauss authored
      979c92df
    • Matthew Leeds's avatar
      gtestdbus: Clarify comment on dropping connection ref · d4db5a82
      Matthew Leeds authored
      In _g_object_unref_and_wait_weak_notify() we take a weak reference and
      then call g_object_unref() in an idle callback, which may look like
      we're dropping a strong reference without having one. So change the
      comment to make it more clear that the reference being dropped is held
      by the caller.
      d4db5a82
    • Matthew Leeds's avatar
      gdbus-connection-loss: Fix test failure · 59ce6b10
      Matthew Leeds authored
      Now that we're not calling g_object_run_dispose() indirectly in
      g_test_dbus_down() (see commit "Revert "gtestdbus: Properly close server
      connections""), the test gdbus-connection-loss is failing with the
      message "Bail out! GLib-GIO-FATAL-WARNING: Weak notify timeout, object
      ref_count=1". This is because we're holding a reference to the singleton
      connection object while calling session_bus_down() in the test's main().
      So then we end up waiting for 30 seconds in
      _g_object_unref_and_wait_weak_notify() for the GWeakNotify to be
      triggered, which never happens.
      
      The fix is to unref the connection before calling session_bus_down().
      This is consistent with how other tests work, and is safe because the
      only method called on the connection has already errored out, as
      asserted by the test.
      59ce6b10
    • Matthew Leeds's avatar
      Revert "Work around test failure in gdbus-names" · 1c63d5d5
      Matthew Leeds authored
      This reverts commit c37cd19f.
      
      Now that we've reverted the commit "gtestdbus: Properly close server
      connections", g_test_dbus_down() no longer returns early and we no
      longer need this workaround. Since the gdbus-names test seems to
      properly unref its GDBusConnection objects it's not clear to me why it
      needed the sleep to succeed. However even at the time the failure wasn't
      reproducible according to this comment[1] so it's probably not worth
      spending more effort trying to reproduce it now.
      
      [1] #787 (comment 214235)
      1c63d5d5
    • Matthew Leeds's avatar
      Revert "gtestdbus: Properly close server connections" · d03025ba
      Matthew Leeds authored
      This reverts commit baf92d09.
      
      Closes #787
      
      According to the original commit, this change was made because otherwise
      g_test_dbus_down() following a g_test_dbus_stop() hangs until it times
      out. The timeout being referred to is the 30 seconds which are waited by
      _g_object_unref_and_wait_weak_notify() for the GWeakNotify to be
      triggered when the last strong reference to the singleton
      GDBusConnection object is dropped. But the patch was not correct and the
      leak should have instead been fixed by having the last strong reference
      holder drop their reference on the GDBusConnection before calling
      g_test_dbus_down(). Timing out after 30 seconds is the desired behavior
      in the case where someone holds a reference to the singleton for that
      entire period.
      
      There are a few problems with this patch. First, as pointed out here[1],
      calling g_object_run_dispose() in the idle callback means we are causing
      the GWeakNotify to trigger ~immediately rather than waiting 30 seconds
      to give another owner a chance to unref. Second, since someone else may
      still hold a reference on the object being disposed, they may call
      methods on it after it's been disposed which can seg fault as documented
      here[2] and as I also saw recently in another project.
      
      It's unclear what the original leak being fixed was, but many have been
      fixed between 2013 and now. I ran all the unit tests under valgrind, and
      some do fail (some consistently and some intermittently) but none of the
      failures seem to only happen after this reversion commit. I also
      couldn't find anywhere in the valgrind output where any GDBusConnection
      objects are definitely being lost.
      
      [1] #787 (comment 214226)
      [2] #787 (comment 214237)
      d03025ba
  8. 01 Jul, 2019 1 commit
  9. 25 Jun, 2019 2 commits
  10. 24 Jun, 2019 2 commits
    • Chun-wei Fan's avatar
      Fix module tests on Visual Studio builds · dbea8d54
      Chun-wei Fan authored
      On Visual Studio, Meson builds modules as xxxx.dll, not libxxxx.dll when
      xxxx is specified as the name for the shared_module() build directive.
      
      This means that in the test programs if we expect for libxxxx for the
      module name, the test will fail as there is no libxxxx.dll but there is
      xxxx.dll.  This makes the test program look for the module files
      correctly.
      dbea8d54
    • Chun-wei Fan's avatar
      gio/tests/resourceplugin.c: Ensure entry points are exported · edc5eb98
      Chun-wei Fan authored
      Ensure that the entry points/symbols are exported on Visual Studio
      builds as well.
      edc5eb98
  11. 21 Jun, 2019 1 commit
  12. 18 Jun, 2019 3 commits
  13. 17 Jun, 2019 12 commits
  14. 12 Jun, 2019 1 commit