Commit c0420db9 authored by Carlos Garnacho's avatar Carlos Garnacho

context: Ensure force_gc flag is not lost if the idle is scheduled

If the first caller that triggers the idle happens to be non-forcing,
all later forcing calls would be ignored.


Closes: #150
parent df4c6b61
......@@ -609,10 +609,11 @@ static void
_gjs_context_schedule_gc_internal(GjsContext *js_context,
bool force_gc)
js_context->force_gc |= force_gc;
if (js_context->auto_gc_id > 0)
js_context->force_gc |= force_gc;
js_context->auto_gc_id = g_idle_add_full(G_PRIORITY_LOW,
js_context, NULL);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment