From 1d59f8d210b7610a83b08d44fe3c16c7951481b8 Mon Sep 17 00:00:00 2001 From: Andrew Comminos Date: Wed, 26 Aug 2015 23:26:21 -0400 Subject: [PATCH] Bug 1197059 - Disable JasPer support in GDK-PixBuf. r=karlt --- widget/gtk/nsAppShell.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/widget/gtk/nsAppShell.cpp b/widget/gtk/nsAppShell.cpp index 6d4a61d50c10..9c314974d823 100644 --- a/widget/gtk/nsAppShell.cpp +++ b/widget/gtk/nsAppShell.cpp @@ -107,6 +107,18 @@ nsAppShell::Init() if (PR_GetEnv("MOZ_DEBUG_PAINTS")) gdk_window_set_debug_updates(TRUE); + // Disable JasPer module in GDK-PixBuf. See bug 1197059. + GSList* pixbufFormats = gdk_pixbuf_get_formats(); + for (GSList* iter = pixbufFormats; iter; iter = iter->next) { + GdkPixbufFormat* format = static_cast(iter->data); + gchar* name = gdk_pixbuf_format_get_name(format); + if (strcmp(name, "jpeg2000") == 0) { + gdk_pixbuf_format_set_disabled(format, TRUE); + break; + } + } + g_slist_free(pixbufFormats); + int err = pipe(mPipeFDs); if (err) return NS_ERROR_OUT_OF_MEMORY;