From e27de832ff2bde8790e56e2764f5b4d8db7e5ad2 Mon Sep 17 00:00:00 2001 From: "karlt+%karlt.net" Date: Tue, 12 Feb 2008 06:47:40 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20413050=20=EF=BF=BD=EF=BF=BD=EF=BF=BD=20ca?= =?UTF-8?q?ll=20cairo=5Fdebug=5Freset=5Fstatic=5Fdata=20in=20system=20cair?= =?UTF-8?q?o=20on=20shutdown=20r=3Dpavlov?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configure.in | 2 ++ gfx/thebes/src/gfxPlatform.cpp | 2 +- toolkit/xre/nsAppRunner.cpp | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 4383c8eb84f..bea02f53d0a 100644 --- a/configure.in +++ b/configure.in @@ -6987,6 +6987,8 @@ MOZ_TREE_CAIRO=1 ) AC_CHECK_HEADERS(stdint.h inttypes.h sys/int_types.h) if test "$MOZ_TREE_CAIRO"; then + AC_DEFINE(MOZ_TREE_CAIRO) + # For now we assume that we will have a uint64_t available through # one of the above headers or mozstdint.h. AC_DEFINE(HAVE_UINT64_T) diff --git a/gfx/thebes/src/gfxPlatform.cpp b/gfx/thebes/src/gfxPlatform.cpp index cd8a218fd37..53456dcee84 100644 --- a/gfx/thebes/src/gfxPlatform.cpp +++ b/gfx/thebes/src/gfxPlatform.cpp @@ -191,7 +191,7 @@ gfxPlatform::~gfxPlatform() // cairo_debug_* function unconditionally. // // because cairo can assert and thus crash on shutdown, don't do this in release builds -#if defined(DEBUG) || defined(NS_BUILD_REFCNT_LOGGING) || defined(NS_TRACE_MALLOC) +#if MOZ_TREE_CAIRO && (defined(DEBUG) || defined(NS_BUILD_REFCNT_LOGGING) || defined(NS_TRACE_MALLOC)) cairo_debug_reset_static_data(); #endif diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 9911f29f39b..929f22968af 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -2366,6 +2366,10 @@ static void MOZ_gdk_display_close(GdkDisplay *display) } else { gdk_display_close(display); +#if GTK_CHECK_VERSION(2,8,0) && \ + (defined(DEBUG) || defined(NS_BUILD_REFCNT_LOGGING) || defined(NS_TRACE_MALLOC)) + cairo_debug_reset_static_data(); +#endif } } #endif // MOZ_WIDGET_GTK2