[gjs/gnome-3-28] context: Ensure force_gc flag is not lost if the idle is scheduled



commit 1c8657038e4e63ec92b9b48b3c0da26d6545ea8c
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Apr 25 13:39:12 2018 +0200

    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.
    
    https://gitlab.gnome.org/GNOME/gjs/issues/150
    
    Closes: #150
    
    (cherry picked from commit c0420db97ea574afe80664d3835995fba0c1e47b)

 gjs/context.cpp | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gjs/context.cpp b/gjs/context.cpp
index a2ce34ae..6911bb3b 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -609,6 +609,8 @@ 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)
         return;
 


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