remove direct access to jsapi
with js24 its not possible to access jsapi directly from C code https://bugzilla.gnome.org/show_bug.cgi?id=711052
This commit is contained in:
parent
e9fbbf4000
commit
7296bedd8e
@ -29,8 +29,6 @@
|
||||
#include "shell-perf-log.h"
|
||||
#include "st.h"
|
||||
|
||||
#include <jsapi.h>
|
||||
|
||||
extern GType gnome_shell_plugin_get_type (void);
|
||||
|
||||
#define SHELL_DBUS_SERVICE "org.gnome.Shell"
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gjs/gjs-module.h>
|
||||
#include <girepository.h>
|
||||
#include <meta/display.h>
|
||||
#include <meta/util.h>
|
||||
@ -1142,44 +1141,6 @@ shell_global_on_gc (GjsContext *context,
|
||||
global->last_gc_end_time = g_get_monotonic_time ();
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_global_get_memory_info:
|
||||
* @global:
|
||||
* @meminfo: (out caller-allocates): Output location for memory information
|
||||
*
|
||||
* Load process-global data about memory usage.
|
||||
*/
|
||||
void
|
||||
shell_global_get_memory_info (ShellGlobal *global,
|
||||
ShellMemoryInfo *meminfo)
|
||||
{
|
||||
JSContext *context;
|
||||
gint64 now;
|
||||
|
||||
#ifdef HAVE_MALLINFO
|
||||
{
|
||||
struct mallinfo info = mallinfo ();
|
||||
meminfo->glibc_uordblks = info.uordblks;
|
||||
}
|
||||
#else
|
||||
meminfo->glibc_uordblks = 0;
|
||||
#endif
|
||||
|
||||
context = gjs_context_get_native_context (global->js_context);
|
||||
|
||||
meminfo->js_bytes = JS_GetGCParameter (JS_GetRuntime (context), JSGC_BYTES);
|
||||
|
||||
meminfo->gjs_boxed = (unsigned int) gjs_counter_boxed.value;
|
||||
meminfo->gjs_gobject = (unsigned int) gjs_counter_object.value;
|
||||
meminfo->gjs_function = (unsigned int) gjs_counter_function.value;
|
||||
meminfo->gjs_closure = (unsigned int) gjs_counter_closure.value;
|
||||
|
||||
now = g_get_monotonic_time ();
|
||||
|
||||
meminfo->last_gc_seconds_ago = (now - global->last_gc_end_time) / G_TIME_SPAN_SECOND;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* shell_global_notify_error:
|
||||
* @global: a #ShellGlobal
|
||||
|
@ -69,10 +69,6 @@ typedef struct {
|
||||
guint last_gc_seconds_ago;
|
||||
} ShellMemoryInfo;
|
||||
|
||||
void shell_global_get_memory_info (ShellGlobal *global,
|
||||
ShellMemoryInfo *meminfo);
|
||||
|
||||
|
||||
/* Run-at-leisure API */
|
||||
void shell_global_begin_work (ShellGlobal *global);
|
||||
void shell_global_end_work (ShellGlobal *global);
|
||||
|
Loading…
Reference in New Issue
Block a user