gfx/cairo/fix-win32-font-assertion.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 From: Jonathan Kew <jkew@mozilla.com>
     2 bug 838617 - don't assert equality with the key's hash unless it was actually initialized. r=roc
     4 diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
     5 --- a/gfx/cairo/cairo/src/cairo-win32-font.c
     6 +++ b/gfx/cairo/cairo/src/cairo-win32-font.c
     7 @@ -2104,19 +2104,19 @@ cairo_win32_font_face_create_for_logfont
     8      font_face = malloc (sizeof (cairo_win32_font_face_t));
     9      if (!font_face) {
    10          _cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
    11  	goto FAIL;
    12      }
    14      _cairo_win32_font_face_init_key (font_face, logfont, font);
    15      _cairo_font_face_init (&font_face->base, &_cairo_win32_font_face_backend);
    16 -    assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash);
    18      if (!font) {
    19 +        assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash);
    20          status = _cairo_hash_table_insert (hash_table,
    21                                             &font_face->base.hash_entry);
    22          if (unlikely (status))
    23  	    goto FAIL;
    24      }
    26  DONE:
    27      if (!font) {

mercurial