зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1722127 - Modify rlbox graphite struct defs for windows compat r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D120777
This commit is contained in:
Родитель
8ded5695e6
Коммит
feb65868cc
|
@ -19,14 +19,17 @@
|
|||
// Don't know the compiler... just let it go through
|
||||
#endif
|
||||
|
||||
// Note that the two size fields below are actually size_t in the headers
|
||||
// However RLBox currently does not handle these correctly. See Bug 1722127.
|
||||
// Use a workaround of unsiged int instead of size_t.
|
||||
#define sandbox_fields_reflection_graphite_class_gr_font_ops(f, g, ...) \
|
||||
f(size_t, size, FIELD_NORMAL, ##__VA_ARGS__) g() \
|
||||
f(unsigned int, size, FIELD_NORMAL, ##__VA_ARGS__) g() \
|
||||
f(float (*)(const void*, unsigned short), glyph_advance_x, FIELD_NORMAL, ##__VA_ARGS__) g() \
|
||||
f(float (*)(const void*, unsigned short), glyph_advance_y, FIELD_NORMAL, ##__VA_ARGS__) g()
|
||||
|
||||
#define sandbox_fields_reflection_graphite_class_gr_face_ops(f, g, ...) \
|
||||
f(size_t, size, FIELD_NORMAL, ##__VA_ARGS__) g() \
|
||||
f(const void* (*)(const void*, unsigned int, size_t*), get_table, FIELD_NORMAL, ##__VA_ARGS__) g() \
|
||||
f(unsigned int, size, FIELD_NORMAL, ##__VA_ARGS__) g() \
|
||||
f(const void* (*)(const void*, unsigned int, unsigned int*), get_table, FIELD_NORMAL, ##__VA_ARGS__) g() \
|
||||
f(void (*)(const void*, const void*), release_table, FIELD_NORMAL, ##__VA_ARGS__) g()
|
||||
|
||||
#define sandbox_fields_reflection_graphite_class_gr_glyph_to_char_cluster(f, g, ...) \
|
||||
|
|
|
@ -622,7 +622,7 @@ hb_face_t* gfxFontEntry::GetHBFace() {
|
|||
|
||||
struct gfxFontEntry::GrSandboxData {
|
||||
rlbox_sandbox_gr sandbox;
|
||||
sandbox_callback_gr<const void* (*)(const void*, unsigned int, size_t*)>
|
||||
sandbox_callback_gr<const void* (*)(const void*, unsigned int, unsigned int*)>
|
||||
grGetTableCallback;
|
||||
sandbox_callback_gr<void (*)(const void*, const void*)>
|
||||
grReleaseTableCallback;
|
||||
|
@ -668,9 +668,10 @@ static thread_local gfxFontEntry* tl_grGetFontTableCallbackData = nullptr;
|
|||
tainted_opaque_gr<const void*> gfxFontEntry::GrGetTable(
|
||||
rlbox_sandbox_gr& sandbox,
|
||||
tainted_opaque_gr<const void*> /* aAppFaceHandle */,
|
||||
tainted_opaque_gr<unsigned int> aName, tainted_opaque_gr<size_t*> aLen) {
|
||||
tainted_opaque_gr<unsigned int> aName,
|
||||
tainted_opaque_gr<unsigned int*> aLen) {
|
||||
gfxFontEntry* fontEntry = tl_grGetFontTableCallbackData;
|
||||
tainted_gr<size_t*> t_aLen = rlbox::from_opaque(aLen);
|
||||
tainted_gr<unsigned int*> t_aLen = rlbox::from_opaque(aLen);
|
||||
*t_aLen = 0;
|
||||
tainted_gr<const void*> ret = nullptr;
|
||||
|
||||
|
|
|
@ -653,7 +653,8 @@ class gfxFontEntry {
|
|||
|
||||
static tainted_opaque_gr<const void*> GrGetTable(
|
||||
rlbox_sandbox_gr& sandbox, tainted_opaque_gr<const void*> aAppFaceHandle,
|
||||
tainted_opaque_gr<unsigned int> aName, tainted_opaque_gr<size_t*> aLen);
|
||||
tainted_opaque_gr<unsigned int> aName,
|
||||
tainted_opaque_gr<unsigned int*> aLen);
|
||||
static void GrReleaseTable(rlbox_sandbox_gr& sandbox,
|
||||
tainted_opaque_gr<const void*> aAppFaceHandle,
|
||||
tainted_opaque_gr<const void*> aTableBuffer);
|
||||
|
|
Загрузка…
Ссылка в новой задаче