[gtkhtml] Warn on console when finalizing HTMLEngine with opened streams
- From: Milan Crha <mcrha src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtkhtml] Warn on console when finalizing HTMLEngine with opened streams
- Date: Fri, 5 Feb 2010 14:17:34 +0000 (UTC)
commit e85fb84f9d0b2b0586e3e37ca487d9dc77fc0119
Author: Milan Crha <mcrha redhat com>
Date: Fri Feb 5 15:16:21 2010 +0100
Warn on console when finalizing HTMLEngine with opened streams
gtkhtml/htmlengine.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index 0a35a2f..1f1aa5f 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -4024,9 +4024,12 @@ html_engine_finalize (GObject *object)
{
HTMLEngine *engine;
GList *p;
+ gint opened_streams;
engine = HTML_ENGINE (object);
+ opened_streams = engine->opened_streams;
+
/* it is critical to destroy timers immediately so that
* if widgets contained in the object tree manage to iterate the
* mainloop we don't reenter in an inconsistant state.
@@ -4211,6 +4214,9 @@ html_engine_finalize (GObject *object)
}
G_OBJECT_CLASS (parent_class)->finalize (object);
+
+ /* just note when will be engine finalized before all the streams are closed */
+ g_return_if_fail (opened_streams == 0);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]