gfx/cairo/fix-cairo-win32-print-gdi-error.diff

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
michael@0 2 --- a/gfx/cairo/cairo/src/cairo-win32-surface.c
michael@0 3 +++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
michael@0 4 @@ -95,20 +95,21 @@ _cairo_win32_print_gdi_error (const char
michael@0 5 FORMAT_MESSAGE_FROM_SYSTEM,
michael@0 6 NULL,
michael@0 7 last_error,
michael@0 8 MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
michael@0 9 (LPSTR) &lpMsgBuf,
michael@0 10 0, NULL)) {
michael@0 11 fprintf (stderr, "%s: Unknown GDI error", context);
michael@0 12 } else {
michael@0 13 - fwprintf (stderr, "%S: %s", context, (char *)lpMsgBuf);
michael@0 14 + fprintf (stderr, "%s: %S", context, (char *)lpMsgBuf);
michael@0 15
michael@0 16 LocalFree (lpMsgBuf);
michael@0 17 }
michael@0 18 + fflush(stderr);
michael@0 19
michael@0 20 /* We should switch off of last_status, but we'd either return
michael@0 21 * CAIRO_STATUS_NO_MEMORY or CAIRO_STATUS_UNKNOWN_ERROR and there
michael@0 22 * is no CAIRO_STATUS_UNKNOWN_ERROR.
michael@0 23 */
michael@0 24
michael@0 25 return _cairo_error (CAIRO_STATUS_NO_MEMORY);
michael@0 26 }

mercurial