[gnome-shell] Add shell_global_gc
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Add shell_global_gc
- Date: Mon, 1 Feb 2010 21:08:32 +0000 (UTC)
commit b1007ed811fd8f3aac26f908429566878ad98b11
Author: Colin Walters <walters verbum org>
Date: Mon Jan 25 16:42:11 2010 -0500
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
src/shell-global.c | 17 ++++++++++++++++-
src/shell-global.h | 2 ++
2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/src/shell-global.c b/src/shell-global.c
index 71600ad..25aa06d 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 e59de70..cbef2db 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]