Tue, 06 Jan 2015 21:39:09 +0100
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.
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 }