diff --git a/gjs-ensure-force_gc-flag-use.patch b/gjs-ensure-force_gc-flag-use.patch new file mode 100644 index 0000000..50ef0a7 --- /dev/null +++ b/gjs-ensure-force_gc-flag-use.patch @@ -0,0 +1,35 @@ +From c0420db97ea574afe80664d3835995fba0c1e47b Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Wed, 25 Apr 2018 13:39:12 +0200 +Subject: [PATCH] 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 +--- + gjs/context.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gjs/context.cpp b/gjs/context.cpp +index a2ce34a..e66a9f8 100644 +--- a/gjs/context.cpp ++++ b/gjs/context.cpp +@@ -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) + return; + +- js_context->force_gc |= force_gc; + js_context->auto_gc_id = g_idle_add_full(G_PRIORITY_LOW, + trigger_gc_if_needed, + js_context, NULL); +-- +libgit2 0.27.0 + diff --git a/gjs.changes b/gjs.changes index e181ef7..11f4a66 100644 --- a/gjs.changes +++ b/gjs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 5 20:00:00 UTC 2018 - bjorn.lie@gmail.com + +- Add gjs-ensure-force_gc-flag-use.patch: context: Ensure force_gc + flag is not lost if the idle is scheduled (glgo#GNOME/gjs#150). + ------------------------------------------------------------------- Sun May 6 21:21:29 UTC 2018 - bjorn.lie@gmail.com diff --git a/gjs.spec b/gjs.spec index 1f0312c..41e1845 100644 --- a/gjs.spec +++ b/gjs.spec @@ -28,6 +28,8 @@ Source0: http://download.gnome.org/sources/gjs/1.52/%{name}-%{version}.ta Patch0: gjs-Add-API-to-force-GC-schedule.patch # PATCH-FIX-UPSTREAM gjs-Queue-forced-GC.patch -- object: Queue a forced GC when toggling down Patch1: gjs-Queue-forced-GC.patch +# PATCH-FIX-UPSTREAM gjs-ensure-force_gc-flag-use.patch -- context: Ensure force_gc flag is not lost if the idle is scheduled +Patch2: gjs-ensure-force_gc-flag-use.patch BuildRequires: gcc-c++ BuildRequires: mozjs52-devel BuildRequires: pkgconfig