[gjs: 1/2] context: Ensure force_gc flag is not lost if the idle is scheduled
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/2] context: Ensure force_gc flag is not lost if the idle is scheduled
- Date: Sat, 28 Apr 2018 23:18:34 +0000 (UTC)
commit c0420db97ea574afe80664d3835995fba0c1e47b
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
gjs/context.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gjs/context.cpp b/gjs/context.cpp
index a2ce34ae..e66a9f82 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]