gfx/cairo/fix-clip-copy.patch

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

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

mercurial