mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
bug 838617 - don't assert equality with the key's hash unless it was actually initialized. r=roc
This commit is contained in:
parent
a19d1387a1
commit
4151979abe
@ -202,6 +202,8 @@ win32-gdi-font-cache.patch: Bug 717178, cache GDI font faces to reduce usage of
|
||||
|
||||
win32-gdi-font-cache-no-HFONT.patch: Bug 717178, don't cache GDI font faces when an HFONT belonging to the caller is passed in
|
||||
|
||||
fix-win32-font-assertion.patch: Bug 838617, fix assertion from bug 717178 that was in the wrong place
|
||||
|
||||
==== pixman patches ====
|
||||
|
||||
pixman-android-cpu-detect.patch: Add CPU detection support for Android, where we can't reliably access /proc/self/auxv.
|
||||
|
@ -2109,9 +2109,9 @@ cairo_win32_font_face_create_for_logfontw_hfont (LOGFONTW *logfont, HFONT font)
|
||||
|
||||
_cairo_win32_font_face_init_key (font_face, logfont, font);
|
||||
_cairo_font_face_init (&font_face->base, &_cairo_win32_font_face_backend);
|
||||
assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash);
|
||||
|
||||
if (!font) {
|
||||
assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash);
|
||||
status = _cairo_hash_table_insert (hash_table,
|
||||
&font_face->base.hash_entry);
|
||||
if (unlikely (status))
|
||||
|
27
gfx/cairo/fix-win32-font-assertion.patch
Normal file
27
gfx/cairo/fix-win32-font-assertion.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From: Jonathan Kew <jkew@mozilla.com>
|
||||
bug 838617 - don't assert equality with the key's hash unless it was actually initialized. r=roc
|
||||
|
||||
diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
|
||||
--- a/gfx/cairo/cairo/src/cairo-win32-font.c
|
||||
+++ b/gfx/cairo/cairo/src/cairo-win32-font.c
|
||||
@@ -2104,19 +2104,19 @@ cairo_win32_font_face_create_for_logfont
|
||||
font_face = malloc (sizeof (cairo_win32_font_face_t));
|
||||
if (!font_face) {
|
||||
_cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
|
||||
goto FAIL;
|
||||
}
|
||||
|
||||
_cairo_win32_font_face_init_key (font_face, logfont, font);
|
||||
_cairo_font_face_init (&font_face->base, &_cairo_win32_font_face_backend);
|
||||
- assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash);
|
||||
|
||||
if (!font) {
|
||||
+ assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash);
|
||||
status = _cairo_hash_table_insert (hash_table,
|
||||
&font_face->base.hash_entry);
|
||||
if (unlikely (status))
|
||||
goto FAIL;
|
||||
}
|
||||
|
||||
DONE:
|
||||
if (!font) {
|
Loading…
Reference in New Issue
Block a user