task: avoid context lock when setting source name

If you set the source name after attaching to the context, you have to
lock the context to free/assign the new source name.

https://bugzilla.gnome.org/show_bug.cgi?id=765861
This commit is contained in:
Christian Hergert 2016-04-30 15:09:43 -07:00 committed by Christian Hergert
parent 05060b6194
commit d95030a2fd

View File

@ -1170,8 +1170,8 @@ g_task_return (GTask *task,
/* Otherwise, complete in the next iteration */
source = g_idle_source_new ();
g_task_attach_source (task, source, complete_in_idle_cb);
g_source_set_name (source, "[gio] complete_in_idle_cb");
g_task_attach_source (task, source, complete_in_idle_cb);
g_source_unref (source);
}