[gnome-builder] code-indexer: add file tracing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] code-indexer: add file tracing
- Date: Tue, 7 Aug 2018 21:43:09 +0000 (UTC)
commit eb7da6a7f5febc2fa422d9a6be083081418d9c9d
Author: Christian Hergert <chergert redhat com>
Date: Tue Aug 7 14:40:58 2018 -0700
code-indexer: add file tracing
In case we're a development build, we might want to simplify who is causing
a leak of the file here.
src/libide/symbols/ide-code-indexer.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/libide/symbols/ide-code-indexer.c b/src/libide/symbols/ide-code-indexer.c
index 3f3002721..1995dbae1 100644
--- a/src/libide/symbols/ide-code-indexer.c
+++ b/src/libide/symbols/ide-code-indexer.c
@@ -134,11 +134,18 @@ ide_code_indexer_index_file_async (IdeCodeIndexer *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
+ g_autoptr(GFile) copy = NULL;
+
g_return_if_fail (IDE_IS_MAIN_THREAD ());
g_return_if_fail (IDE_IS_CODE_INDEXER (self));
g_return_if_fail (G_IS_FILE (file));
g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
+#ifdef IDE_ENABLE_TRACE
+ /* Simplify leak detection */
+ file = copy = g_file_dup (file);
+#endif
+
return IDE_CODE_INDEXER_GET_IFACE (self)->index_file_async (self, file, build_flags, cancellable,
callback, user_data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]