Skip to content
  1. Jul 19, 2019
  2. May 08, 2019
  3. Oct 07, 2018
  4. Oct 04, 2018
    • Debarshi Ray's avatar
      online-accounts: Track the lifecycle of CcGoaPanel across async calls · 83558429
      Debarshi Ray authored
      Due to an API bug in GNOME Online Accounts, the asynchronous
      goa_provider_get_all method doesn't accept a GCancellable argument.
      This makes it difficult to cancel an ongoing call when the CcGoaPanel
      gets destroyed.
      
      Prior to commit c26f8ae0, this was hacked around by taking a
      reference on the panel for the duration of the call. Instead of
      cancelling a pending call on destruction, it would keep the panel alive
      until the call was over. However, that was lost during commit
      c26f8ae0.
      
      One thing to bear in mind is that GtkWidgets, CcGoaPanel is one, can
      be destroyed by a gtk_widget_destroy call, which is subtly different
      than a simple sequence of g_object_unref calls. When gtk_widget_destroy
      is used, it invokes the GObject::dispose virtual method of the widget.
      It is expected this will cause anything holding a reference to this
      widget to drop their references, leading to GObject::finalize being
      called. However, there is no guarantee that this will happen in the
      same iteration of the GMainLoop. Therefore, it is possible that when
      the goa_provider_get_all call finishes, the CcGoaPanel might be in a
      disposed, but not yet finalized state.
      
      When a GObject is in a disposed-but-not-finalized state, only a very
      limited number of operations can be performed on it. Its reference
      count can be altered, the memory used by the instance struct can be
      accessed, but none of the member GObjects can be assumed to be valid.
      eg., it's definitely illegal to add new rows to the member GtkListBox.
      Hence a boolean flag is used to mark the destroyed state of the panel.
      
      This second part is a small improvement over the earlier hack.
      
      #208
      83558429
    • Debarshi Ray's avatar
      77f7c250
  5. Mar 12, 2018
  6. Mar 04, 2018
  7. Feb 28, 2018
  8. Feb 26, 2018
  9. Feb 20, 2018
  10. Feb 19, 2018
  11. Feb 07, 2018
  12. Feb 06, 2018
  13. Feb 01, 2018
  14. Jan 21, 2018
  15. Jan 16, 2018
  16. Jan 05, 2018
  17. Dec 20, 2017
  18. Dec 08, 2017
  19. Nov 30, 2017
  20. Nov 27, 2017
  21. Nov 23, 2017
  22. Nov 21, 2017
  23. Nov 18, 2017
  24. Nov 16, 2017
  25. Nov 15, 2017
  26. Nov 14, 2017
  27. Nov 13, 2017