gfx/cairo/pattern_get_surface-no-error.patch

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 # HG changeset patch
michael@0 2 # User Robert O'Callahan <robert@ocallahan.org>
michael@0 3 # Date 1294019288 -46800
michael@0 4 # Node ID e427b4ea7e2ff980769e1acd92f4730c5ed3654f
michael@0 5 # Parent bacc54d452a9fddb5a0d6a1442ec7be4de81ffa7
michael@0 6 Bug 593604. Part 2.5: cairo_pattern_get_surface should not call cairo_error. r=jrmuizel,a=blocking
michael@0 7
michael@0 8 diff --git a/gfx/cairo/cairo/src/cairo-pattern.c b/gfx/cairo/cairo/src/cairo-pattern.c
michael@0 9 --- a/gfx/cairo/cairo/src/cairo-pattern.c
michael@0 10 +++ b/gfx/cairo/cairo/src/cairo-pattern.c
michael@0 11 @@ -2940,17 +2940,17 @@ cairo_pattern_get_surface (cairo_pattern
michael@0 12 cairo_surface_t **surface)
michael@0 13 {
michael@0 14 cairo_surface_pattern_t *spat = (cairo_surface_pattern_t*) pattern;
michael@0 15
michael@0 16 if (pattern->status)
michael@0 17 return pattern->status;
michael@0 18
michael@0 19 if (pattern->type != CAIRO_PATTERN_TYPE_SURFACE)
michael@0 20 - return _cairo_error (CAIRO_STATUS_PATTERN_TYPE_MISMATCH);
michael@0 21 + return CAIRO_STATUS_PATTERN_TYPE_MISMATCH;
michael@0 22
michael@0 23 if (surface)
michael@0 24 *surface = spat->surface;
michael@0 25
michael@0 26 return CAIRO_STATUS_SUCCESS;
michael@0 27 }
michael@0 28
michael@0 29 /**

mercurial