[gjs/gnome-3-28] context: use timeout with seconds to schedule a gc trigger



commit a472883f00ea19b835ccd1aacdfc90d5be8fd495
Author: Marco Trevisan <mail 3v1n0 net>
Date:   Mon Oct 8 14:18:58 2018 +0000

    context: use timeout with seconds to schedule a gc trigger
    
    We can use lower granularity as we care about seconds anyway
    
    (cherry picked from commit 0fb9228d97fe574643276e53bb00d2cdaadea262)

 gjs/context.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gjs/context.cpp b/gjs/context.cpp
index 15b4a919..4b26a985 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -615,10 +615,9 @@ _gjs_context_schedule_gc_internal(GjsContext *js_context,
         return;
 
     js_context->force_gc |= force_gc;
-    js_context->auto_gc_id = g_timeout_add_full(G_PRIORITY_LOW,
-                                                10000,
-                                                trigger_gc_if_needed,
-                                                js_context, NULL);
+    js_context->auto_gc_id = g_timeout_add_seconds_full(G_PRIORITY_LOW, 10,
+                                                        trigger_gc_if_needed,
+                                                        js_context, NULL);
 }
 
 void


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