[gjs: 2/9] mem: Expose gjs_memory_report() in public API
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 2/9] mem: Expose gjs_memory_report() in public API
- Date: Sun, 2 Sep 2018 00:07:37 +0000 (UTC)
commit bd2ae8ee2edf5b6980e5e7e8d8a6bce3a5244ef8
Author: Philip Chimento <philip chimento gmail com>
Date: Sat Aug 18 16:15:54 2018 -0400
mem: Expose gjs_memory_report() in public API
This function was already used as "public" API, in minijasmine. However,
it seems useful to expose to other embedders such as GNOME Shell.
gjs/gjs.h | 3 ++-
gjs/mem.h | 4 +++-
installed-tests/minijasmine.cpp | 6 +++---
3 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/gjs/gjs.h b/gjs/gjs.h
index b044d0f5..99776561 100644
--- a/gjs/gjs.h
+++ b/gjs/gjs.h
@@ -24,9 +24,10 @@
#ifndef __GJS_GJS_H__
#define __GJS_GJS_H__
-#include <gjs/macros.h>
#include <gjs/context.h>
#include <gjs/coverage.h>
+#include <gjs/macros.h>
+#include <gjs/mem.h>
#include <gjs/profiler.h>
#include <util/error.h>
diff --git a/gjs/mem.h b/gjs/mem.h
index 62389e57..6d2e6ca7 100644
--- a/gjs/mem.h
+++ b/gjs/mem.h
@@ -26,7 +26,8 @@
#include <stdbool.h>
#include <glib.h>
-#include "gjs/jsapi-util.h"
+
+#include "gjs/macros.h"
G_BEGIN_DECLS
@@ -68,6 +69,7 @@ GJS_DECLARE_COUNTER(repo)
#define GJS_GET_COUNTER(name) \
g_atomic_int_get(&gjs_counter_ ## name .value)
+GJS_EXPORT
void gjs_memory_report(const char *where,
bool die_if_leaks);
diff --git a/installed-tests/minijasmine.cpp b/installed-tests/minijasmine.cpp
index b174c71b..ebe5393f 100644
--- a/installed-tests/minijasmine.cpp
+++ b/installed-tests/minijasmine.cpp
@@ -21,17 +21,17 @@
* IN THE SOFTWARE.
*/
-#include "config.h"
+#include "config.h" // NOLINT(build/include_order)
#include <locale.h>
#include <unistd.h>
+#include <gio/gio.h>
+#include <girepository.h>
#include <glib.h>
#include <glib/gstdio.h>
-#include <gio/gio.h>
#include "gjs/gjs.h"
-#include "gjs/mem.h"
G_GNUC_NORETURN
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]