Add shell_global_gc

Primarily useful for debugging.  This was originally a patch against
gjs: https://bugzilla.gnome.org/show_bug.cgi?id=595323

But rather than add a random toplevel module just for this function
effectively, we can easily enough define it here.  Adding toplevel
modules to GScript should have a bit more formal process to it.

https://bugzilla.gnome.org/show_bug.cgi?id=608095
This commit is contained in:
Colin Walters 2010-01-25 16:42:11 -05:00
parent 54d385a0a9
commit b1007ed811
2 changed files with 18 additions and 1 deletions

View File

@ -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;

View File

@ -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);