gfx/cairo/fix-clip-copy.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 commit f49a9740350d2f0d69ed59e913f0263a899cfb2a
michael@0 2 Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
michael@0 3 Date: Fri Jan 29 14:39:24 2010 -0500
michael@0 4
michael@0 5 Fix clip copy
michael@0 6
michael@0 7 diff --git a/src/cairo-clip.c b/src/cairo-clip.c
michael@0 8 index 8d66a5f..6acbcff 100644
michael@0 9 --- a/src/cairo-clip.c
michael@0 10 +++ b/src/cairo-clip.c
michael@0 11 @@ -280,13 +280,12 @@ cairo_clip_t *
michael@0 12 _cairo_clip_init_copy (cairo_clip_t *clip, cairo_clip_t *other)
michael@0 13 {
michael@0 14 if (other != NULL) {
michael@0 15 - if (other->path == NULL) {
michael@0 16 - _cairo_clip_init (clip);
michael@0 17 - clip = NULL;
michael@0 18 - } else {
michael@0 19 - clip->all_clipped = other->all_clipped;
michael@0 20 - clip->path = _cairo_clip_path_reference (other->path);
michael@0 21 - }
michael@0 22 + clip->all_clipped = other->all_clipped;
michael@0 23 + clip->path = _cairo_clip_path_reference (other->path);
michael@0 24 +
michael@0 25 + /* this guy is here because of the weird return semantics of _cairo_clip_init_copy */
michael@0 26 + if (!other->path)
michael@0 27 + return NULL;
michael@0 28 } else {
michael@0 29 _cairo_clip_init (clip);
michael@0 30 }

mercurial