gfx/cairo/fix-win32-font-assertion.patch

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial