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.
michael@0 | 1 | diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c |
michael@0 | 2 | --- a/gfx/cairo/cairo/src/cairo-win32-font.c |
michael@0 | 3 | +++ b/gfx/cairo/cairo/src/cairo-win32-font.c |
michael@0 | 4 | @@ -1182,22 +1182,22 @@ _add_glyph (cairo_glyph_state_t *state, |
michael@0 | 5 | if (state->glyphs.num_elements > 0) { |
michael@0 | 6 | int dx; |
michael@0 | 7 | |
michael@0 | 8 | if (logical_y != state->last_y) { |
michael@0 | 9 | status = _flush_glyphs (state); |
michael@0 | 10 | if (status) |
michael@0 | 11 | return status; |
michael@0 | 12 | state->start_x = logical_x; |
michael@0 | 13 | + } else { |
michael@0 | 14 | + dx = logical_x - state->last_x; |
michael@0 | 15 | + status = _cairo_array_append (&state->dx, &dx); |
michael@0 | 16 | + if (status) |
michael@0 | 17 | + return status; |
michael@0 | 18 | } |
michael@0 | 19 | - |
michael@0 | 20 | - dx = logical_x - state->last_x; |
michael@0 | 21 | - status = _cairo_array_append (&state->dx, &dx); |
michael@0 | 22 | - if (status) |
michael@0 | 23 | - return status; |
michael@0 | 24 | } else { |
michael@0 | 25 | state->start_x = logical_x; |
michael@0 | 26 | } |
michael@0 | 27 | |
michael@0 | 28 | state->last_x = logical_x; |
michael@0 | 29 | state->last_y = logical_y; |
michael@0 | 30 | |
michael@0 | 31 | status = _cairo_array_append (&state->glyphs, &glyph_index); |