diff --git a/src/shell-global.c b/src/shell-global.c index 71600ad62..25aa06dda 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -812,7 +812,22 @@ shell_global_reexec_self (ShellGlobal *global) g_ptr_array_free (arr, TRUE); } -void +/** + * shell_global_gc: + * @global: A #ShellGlobal + * + * Start a garbage collection process. For more information, see + * https://developer.mozilla.org/En/JS_GC + */ +void +shell_global_gc (ShellGlobal *global) +{ + JSContext *context = gjs_context_get_context (global->js_context); + + JS_GC (context); +} + +void shell_global_grab_dbus_service (ShellGlobal *global) { GError *error = NULL; diff --git a/src/shell-global.h b/src/shell-global.h index e59de7092..cbef2dba9 100644 --- a/src/shell-global.h +++ b/src/shell-global.h @@ -74,6 +74,8 @@ gboolean shell_global_display_is_grabbed (ShellGlobal *global); void shell_global_reexec_self (ShellGlobal *global); +void shell_global_gc (ShellGlobal *global); + void shell_global_format_time_relative_pretty (ShellGlobal *global, guint delta, char **text, guint *update_time); ClutterActor *shell_global_create_root_pixmap_actor (ShellGlobal *global);