[gnome-builder] threading: use alternate message for object destruction



commit 676bcf6390955270671470850bbb8b7640e9d261
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jan 14 16:53:46 2019 -0800

    threading: use alternate message for object destruction
    
    This makes tracking down the exact issue during destruction easier.

 src/libide/threading/ide-task.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/threading/ide-task.c b/src/libide/threading/ide-task.c
index 78ea7f76a..1f082e34d 100644
--- a/src/libide/threading/ide-task.c
+++ b/src/libide/threading/ide-task.c
@@ -1547,15 +1547,21 @@ ide_task_propagate_locked (IdeTask            *self,
         *error = g_error_copy (priv->result->u.v_error);
     }
   else if ((priv->check_cancellable && g_cancellable_is_cancelled (priv->cancellable)) ||
-           priv->result->type == IDE_TASK_RESULT_CANCELLED ||
-           (IDE_IS_OBJECT (priv->source_object) &&
-            ide_object_in_destruction (IDE_OBJECT (priv->source_object))))
+           priv->result->type == IDE_TASK_RESULT_CANCELLED)
     {
       g_set_error (error,
                    G_IO_ERROR,
                    G_IO_ERROR_CANCELLED,
                    "The operation was cancelled");
     }
+  else if (IDE_IS_OBJECT (priv->source_object) &&
+           ide_object_in_destruction (IDE_OBJECT (priv->source_object)))
+    {
+      g_set_error (error,
+                   G_IO_ERROR,
+                   G_IO_ERROR_CANCELLED,
+                   "The object was destroyed while the task executed");
+    }
   else if (priv->result->type != expected_type)
     {
       g_set_error (error,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]